Hi,
I have created a GoogleMap on my website. I would like to load all the
points for a polyline from MySQL. I do this with AJAX.
Here is my js code:
http.onreadystatechange = function()
{
var points = http.responseText;
if(http.readyState == 4)
{
// TEST
document.getElementById('test').innerHTML = points;
if(points != "NP") map.addOverlay(new GPolyline(points, '#ff0000',
2, 1));
}
}
The test div (see // TEST) show's me the correct data:
[
new GLatLng(41.0124,28.9759),
new GLatLng(37.8703,30.84),
new GLatLng(36.8875,30.7031),
new GLatLng(36.6437,30.5573)
]
Still, it doesn't draw the lines when I inlcude 'points' into the
overlay
// map.addOverlay(new GPolyline(points, '#ff0000', 2, 1)), //
Anyone know a fix to this problem?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---