Sweet, that realy did the trick.
Fixed it like this:
// obtain the attribues of each marker
var lat = parseFloat(tmarkers[i].getAttribute("lat"));
var lng = parseFloat(tmarkers[i].getAttribute("lng"));
var point = new GLatLng(lat,lng);
var type = tmarkers[i].getAttribute("country");
var id = tmarkers[i].getAttribute("id");
var marker = new GMarker(point,greenIcon);
markers.push(marker);
addListeners(marker, id)
}
var minZoom = mapZoom + 2;
markerMgr.addMarkers(markers,minZoom);
});
}
// function to add listeners for the markers
function addListeners(marker, id) {
GEvent.addListener(marker, "click", function() {
map.closeInfoWindow();
var textHTML = "getphp.php?id=" +id;
GDownloadUrl(textHTML, function(doc) {
marker.openInfoWindowHtml(doc);
});
});
return marker;
}
thanx again for sharing your expertise
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---