Google maps api v3 LatLng conversion error -


i'm doing ajax call request position , move marker relative position is. problem latlng command returns (nan,nan) though variable "data" contains position. doing wrong here?

  function marker()   {         $.get("ajax.php", { do: "getpos" }, function(data){             var latlng = new google.maps.latlng(data);                 alert(latlng);             beachmarker.setposition(latlng);         });         //settimeout( "marker()", 10000);   } 

as documentation says, latlng constructor should have 2 parameters, both must numbers. ajax response can't of number type. string, should split , parse numbers passing latlng constructor.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -