开发者

plotting google map markers using an array

i need some help with google map api v3 markers.

I got an array which contains coordinates i retrieve from a file. I am trying to traverse the array, and plot them using the markers.

Traversing the array to retrieve the coordinates is not a problem, however, when i start using the coordinates to plot on google map. i realise that i am getting (NaN, NaN) as the coordinates.. Because of this, i am not able to do the plotting.. any idea why isit? Thanksss

my codes so far:

   var temp = new google.maps.LatLng(myObject[o]);
   retrievero开发者_开发百科uteMarker(temp);


The constructor for LatLng takes two arguments (the latitude and longitude of the point), so this line is clearly wrong:

var temp = new google.maps.LatLng(myObject[o]);

Of course, since we have to idea what myObject is, or what the function retrieverouteMarker does, there isn't much more we can do to help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜