GMaps V3 InfoWindow - disable the close “x” button

前端 未结 22 1078
青春惊慌失措
青春惊慌失措 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:05

    You can just use the option

    closeBoxURL : ""

    http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html

    From Google Documentation

    closeBoxURL | string | The URL of the image representing the close box. Note: The default is the URL for Google's standard close box. Set this property to "" if no close box is required.

    Example

       var infowindow = new google.maps.InfoWindow({
                              closeBoxURL: "",
                              closeBoxMargin : ""
    
                            });
    

提交回复
热议问题