Hi,

I have a map with multiple markers loading from XML.

The markers load properly, but no matter which marker I click, the
same bubble pops up on the same marker.

Here is my loop:
=====================

      var markers =
data.documentElement.getElementsByTagName("marker");
      for (var i = 0; i < markers.length; i++)
      {
        var bubbletext = "<p>"+ markers[i].getAttribute("club") +" ::
"+ markers[i].getAttribute("stat") +"</p>";
        var latlng = new
google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")));
        var infowindow = new google.maps.InfoWindow({content:
bubbletext});
        var marker = new google.maps.Marker({position: latlng, map:
map});
        google.maps.event.addListener(
        marker, "click", function() {
                infowindow.open(map, marker);
        });
       }
     });

=====================

Any help would be appreciated.
Thanks, Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to