javascript - Google Maps API infoWindow.close() does nothing -
function bindinfowindow(marker, map, infowindow, html) { //infowindow.close(); <---- ignore 1 google.maps.event.addlistener(marker, 'click', function() { infowindow.close(); infowindow.setcontent(html); infowindow.open(map, marker); }); }
this function listener when marker clicked regardless infowindows not close unless click them remain on screen when click them , error there no close function. help please!
infowindow close works fine. suspect expecting close different infowindow.
in illustration close infowindow (if open) , open again, won't see that.
try adding:
google.maps.event.addlistener(map, "click", function() {infowindow.close();}); then clicking on map. note, not final solution, technique show close.
example
javascript google-maps-api-3
No comments:
Post a Comment