How to manually reload Google Map with JavaScript

后端 未结 3 607
情深已故
情深已故 2020-12-15 02:52

I am using this piece of code within a Bootstrap template. I am facing issues when loading images within a Bootstrap Tab content pane.

This is the JavaScript code wh

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 03:19

    Yes, you can 'refresh' a Google Map like this:

    google.maps.event.trigger(map, 'resize');
    

    This basically sends a signal to your map to redraw it.

    Hope that helps!

提交回复
热议问题