Hi,
i want to display coordinates from a database with markers. Everything
works well, except displaying the markers. It puts all the markers on
the same point, but if I give the coordinates with alert out, it is
correct.
var points = [];
var punkte = response.getElementsByTagName("node");
alert("Auswerten, Anzahl der Punkte: " + punkte.length);
for (var i = 0; i < punkte.length; i++) {
var punkt = punkte.item(i);
var lat = punkt.getAttribute("lat");
var lon = punkt.getAttribute("lon");
// alert("Position i:" + i + " lat: " + lat + "
lng: " + lon)
var latlon = new GLatLng(lat, lon);
points.push(latlon);
var marker = createMarker(points);
bremenkarte.addOverlay(marker);
}
function createMarker(point) {
var marker = new GMarker(point);
return marker;
}
I don't know what's the bug.
--
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.