Google Maps v3 load partially on top left corner, resize event does not work

后端 未结 7 1675
执笔经年
执笔经年 2020-11-30 03:28

Google Maps V3 loaded partially on top left corner. I tried the following methods:

  • Add google.maps.event.trigger(map, \'resize\'); after map in

7条回答
  •  -上瘾入骨i
    2020-11-30 03:53

    I think your map is hidden at the time you create it: there's a display:none on the #summary-content div that the map is nested inside.

    You should try triggering the resize event after that div is made visible instead of during initialization.

    In fact, you could probably just call your initializeMap() function event at the time that div is made visible, instead of calling it in your .ready() function.

提交回复
热议问题