Google Map API inside a Reveal Modal not showing fully

后端 未结 5 1716
鱼传尺愫
鱼传尺愫 2020-12-21 08:34

I am having problems with a Google Map that I have inside a div, which upon button click, pops up on screen. The Google Map is only partially showing. I know that I need t

5条回答
  •  醉梦人生
    2020-12-21 09:37

    Removing width: 600px; on the

    and triggering resize on your map after opening the modal should do the trick:

    $(".reveal-modal").on("reveal:opened", function(e) {
      google.maps.event.trigger(map, 'resize')
    });
    

提交回复
热议问题