gmaps
gmaps copied to clipboard
Can not find alternative for Marker Close Listener
Something like this
google.maps.event.addListener(infoWindow,'closeclick',function(){ alert("closed click"); //or get this marker object });
During creating marker list, it should be somewhere something like this: closeclick: function (e) { alert("closed click"); }
I had the same issue, found a workaround in case you only need one window opened at a time. Simply close them all using gmaps method hideInfoWindows
.
My jQuery version:
$(document).on('click', '.close_icon', function(e) {
e.preventDefault();
map.hideInfoWindows();
});