Thanks!!! Worked perfectly... for some reason i did not see this post until ESA mentioned it...
On Mar 4, 9:01 pm, Mike Williams <[email protected]> wrote: > Wasn't it sarris who wrote: > > > > > > >http://koti.mbnet.fi/ojalesa/exam/events_v2x.html > > >if you check this you will see that when you click a marker, the > >series of events that happen is > >mousedown > >mouseup > >infowindowbeforeclose > >infowindowclose > >click > >infowindowopen > > >which means that i know what i am talking about. > >what i am asking is whether there is a way to avoid the > >infowindowclose event to happen.or at least if the click event > >happened before i could set a flag. the mouseup event wont help me > >cause it happens when you drag a marker as well > >thanks > > You can't do it with bindInfoWindow, but you can do it with > GEvent.addListener(marker, "click") > > All you need to do is remember which marker has the info window open on > it. When you get a click on that same marker, skip the > marker.openInfoWindow call. > > var lastmarker = 0; // global > > GEvent.addListener(marker, "click", function() { > if (marker != lastmarker) { > marker.openInfoWindowHtml(html); > } > lastmarker = marker; > }); > > GEvent.addListener(map,"infowindowclose", function() { > lastmarker = 0; // the infowindow is no longer open on the marker > ... > }); > > --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 -~----------~----~----~----~------~----~------~--~---
