I tried to add some listeners for Info Window like:
//works
google.maps.event.addListener(markerInfoWindow, "closeclick", function()
{
console.log('trigger close');
});
//doesn't work
google.maps.event.addListener(markerInfoWindow, "click", function()
{
console.log('trigger close');
});
Is there a list of events for infoWindow in documentation I missed or is there another way to make things done?
Actually the problem is that I want to create an event listener to close infoWindow on mouseout
google.maps.event.addListener(markerInfoWindow, 'mouseout', function(){
console.log('trigger close');
self._setInfoWndClosed();
});
the self._setInfoWndClosed()
is working correctly in context of closeclick
event. And I end up finding out that actually listener doesn't work itself.