gmaps icon indicating copy to clipboard operation
gmaps copied to clipboard

Can not find alternative for Marker Close Listener

Open xntvno opened this issue 8 years ago • 1 comments

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"); }

xntvno avatar Jan 28 '17 15:01 xntvno

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();
});

markovic-nikola avatar Nov 27 '17 23:11 markovic-nikola