Google Maps API v3 infowindow close event/callback?

后端 未结 4 1007
攒了一身酷
攒了一身酷 2020-12-13 12:14

I like to keep track of any and all infowindows that are open on my Google Maps interface (I store their names in an array), but I can\'t figure out how to remove them from

4条回答
  •  庸人自扰
    2020-12-13 12:35

    Try this:

    var closeBtn = $('.gm-style-iw').next();
    closeBtn.click(function(){
        //other things you want to do when close btn is click
        that.infowindow.close();
    });
    

    I overwrite this click function because the click button won't work in safari after I change the css/position of it.

提交回复
热议问题