Hi Bradley, Since the event you get on your OverlayView is just a DOM event, you can stop its propagation/cancel bubbling on it in your event handler (see this quirksmode article: http://www.quirksmode.org/js/events_order.html). This will stop the event from reaching the map at all.
Hope that helps, Susannah On Jul 20, 3:03 am, Bradley <[email protected]> wrote: > This also relates to an earlier post of mine (http://groups.google.com/ > group/google-maps-js-api-v3/browse_thread/thread/bb0bc9d70994cc0f/ > 937320e6ba2f6e3a?lnk=gst&q=overlayview#937320e6ba2f6e3a) that was > never answered, but my problem is new. > > It seems that the order in which events get triggered when clicking a > map overlay has switched. Previously if I clicked my custom overlay, > I would get a map click first, then an overlay click, now it's the > opposite. (Note, I haven't figured out how to avoid the map click > being triggered on my custom overlay, even though the api says a click > on an overlay should NOT trigger a map click event - previous post > explains that) > > Anyway, so my problem is that I open an info window when you click a > marker and close all of them if you click on the map (not on an > overlay) Well this all worked because originally the overlay click > event happened AFTER the map click event, so i could just close all > infowindows on map click and open my specific one on overlay click. > Well now I'm getting the overlay click event first which opens the > infoWindow and map click 2nd which closes all infoWindows, so I never > actually see my infoWindow open. (here's an > example:http://zerochallenge.zerofootprint.net/results) > > Once again all this would be mitigated by a proper click handling on > my custom overlays, but I don't know how to do that? How do I specify > the dimensions of my overlay such that a click on it does NOT trigger > a click on the map? -- 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.
