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

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

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