GMaps V3 InfoWindow - disable the close “x” button

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

    closeBoxURL: ""
    

    as stated before doesn't apply for InfoWIndow. This is an option on the InfoBox.

    You may for example use this CSS workaround to remove the X, and the surrounding clickable button:

    .gm-style-iw + div {
      display: none;
    }
    

    And as davidkonrad said. This is a workaround on the code as it is today. It will likely be changed.

提交回复
热议问题