One thing that's going wrong is that you never read the IDs of your
markers from anywhere. When you get to this line, which is supposed to
create the index entry that links the IDs to the markers
idmarkers[id.toLowerCase()] = marker;
Your "id" variable is the value that got passed as a parameter, rather
than the ID of this marker.
That causes this to always be true
if (id) {
if (idmarkers[id]) {
GEvent.trigger(idmarkers[id],"click");
so the "click" always gets triggered on every marker.
Hint: That chunk of code would be better placed outside the
for (var i = 0; i < markers.length; i++) {
loop, so that you only run it once.
I guess that you don't see any info window appear because the triggered
"click" that causes the marker that has been map.addOverlay()ed to
display the infowindow is immediately followed by clicks on other
markers that have not been added to the map.
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---