Re: [Google Maps API v3] How do I close InfoWindow when user clicks anywhere outside of the MAP?

2011-10-21 Thread Francis Wecker
Oh, it's simple, try test if infoWindow is open before close; -- 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 google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send ema

[Google Maps API v3] How do I close InfoWindow when user clicks anywhere outside of the MAP?

2011-10-21 Thread Sandeep
How do I close InfoWindow when user clicks anywhere outside of the MAP - that is somewhere else in the browser window. I tried using google.maps.event.addDomListener(window, 'click', function() { infoWindow.close(); }); and it seems to work. However once a InfoWindow is closed - it does not reo