So then how would I create a single listener like above that works for all the markers I am placing on the page?
On Fri, Jun 11, 2010 at 9:00 AM, [email protected] <[email protected]>wrote: > On Jun 11, 6:56 am, Nathan Raley <[email protected]> wrote: > > I am moving my map from v2 to v3 and I have a function that no longer > > appears to be functioning and am needing to get one back up and running. > > > > The function in question is: > > > > > BCMarkerListeners.push(google.maps.event.addListener(map,"click",function(o > verlay,latlng,overlaylatlng) > > { > > alert("click"); > > if(latlng) { > > return; > > } > > else if(overlaylatlng) { > > point = overlaylatlng; > > } > > if(EditBCMarkerMode == true) { > > UpdateBCMarkerClickString = "P" + point; > > return; > > } > > else > > return; > > > > From what I've read it appears that the map click event is no longer > > triggered if the user clicks on a marker or info window? > > That is what the documentation says: > > http://code.google.com/apis/maps/documentation/javascript/reference.html#Map > click > MouseEvent > This event is fired when the user clicks on the map (but not when they > click on a marker or infowindow). > > > How would I go about creating the listener then that was similar in > function > > to this? > > > > I was trying to avoid having to add a listener for each marker I created > on > > the map and thus improve the load time of creating the said markers. > > > > Any ideas? > > > > -- > 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.
