Guest User

Untitled

a guest
Apr 4th, 2015
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. var markerLatLng = [];
  2. jQuery.getJSON($url, function(result){
  3. jQuery.each(result.results,function(idx,obj){
  4. markerLatLng.push(new google.maps.LatLng(obj.geometry.location.lat,obj.geometry.location.lng));
  5. });
  6. //kalau disini mengluarkan hasil sesuai dengan jumlah array
  7. console.log(markerLatLng.length);
  8. });
  9. //akan tetapi law disini hasilnya 0
  10. console.log(markerLatLng.length);
Advertisement
Add Comment
Please, Sign In to add comment