View difference between Paste ID: 2pdWAP2i and 22xqWjVk
SHOW: | | - or go back to the newest paste.
1
var markerLatLng = [];
2
function tarik(){
3
    jQuery.getJSON($url, function(result){
4
        jQuery.each(result.results,function(idx,obj){
5
            markerLatLng.push(new google.maps.LatLng(obj.geometry.location.lat,obj.geometry.location.lng));
6
        });
7
        //kalau disini mengluarkan hasil sesuai dengan jumlah array
8
        console.log(markerLatLng.length);
9-
    //akan tetapi law disini hasilnya 0
9+
10-
    console.log(markerLatLng.length);
10+
    //akan tetapi law disini hasilnya 0 
11
    console.log(markerLatLng.length);
12
}
13
14
tarik();