JQuery Mobile and Google Maps Not Rendering Correctly

后端 未结 5 2030
星月不相逢
星月不相逢 2021-02-06 00:22

I am simply trying to display a google map within a jquery mobile page. If I load the page directly it works. However, if I navigate to the page from another page it only rend

5条回答
  •  再見小時候
    2021-02-06 01:00

    I think the right approach would be to trigger the event when partial tile is loaded once. Below code snippet will help you in achieving that.

    google.maps.event.addListenerOnce(map, 'tilesloaded', function(){
        google.maps.event.trigger(map,'resize');
    });
    

提交回复
热议问题