Please provide a link to your site, and steps to reproduce the issue. I have examples of multiple polygons with click events working fine, so I can't replicate this issue for myself.
Thanks Ben On Sun, Nov 29, 2009 at 11:26 PM, d.bun <[email protected]> wrote: > Hi there, I'm fairly new to building google maps. > I started a map that allows you to draw multiple markers, polylines, > and polygons. > In one instance I create multiple markers, I'm able to remove eachone > by adding an event listener with the following code: > > marker = new google.maps.Marker({map: map, position: event.latLng}); > google.maps.event.addListener(marker, 'click', remove); > > > However if I try to do the same with polygons, I can only remove the > most recently created polygon: > > polygon = new google.maps.Polygon({paths: path, map: map}); > google.maps.event.addListener(polygon, 'click', remove); > > The same problem happens with polylines. > > What's the difference between markers vs polylines & polygons? Would > someone know or can suggest a way to work around this or point me in > the right direction, where I'm able to create multiple polygons each > with their own events. > > -- > > 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]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > > -- 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.
