GMaps V3 InfoWindow - disable the close “x” button

前端 未结 22 1086
青春惊慌失措
青春惊慌失措 2020-12-05 09:14

From what I see, in v2 of GMaps API there was a property \"buttons\" of the InfoWindow object that one could define in a way that given InfoWindow has no close button:

22条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 10:21

    in jQuery's gmap3 plugin this can be accomplished using

    google.maps.event.addListener($('#map').gmap3({get:{name:"infowindow"}}), 'domready', function(){
        $(".gm-style-iw").next("div").remove();
    });
    

提交回复
热议问题