google maps v3 change size of infowindow

前端 未结 6 1640
盖世英雄少女心
盖世英雄少女心 2021-02-04 14:25

I would like to set the size of an infowindow to fit the content inside. The standard infowindow is too wide I tried to use maxWidth but it doesn\'t seem to work. What is the be

6条回答
  •  爱一瞬间的悲伤
    2021-02-04 14:44

    To set the size of the bubble info-window inside a google map it's enough to add the following css in your CSS file:

    .gmap-popup {
      max-width:204px;
      max-height:110px;
    }
    

    Adapted from this discussion.

提交回复
热议问题