Keep a Google Maps v3 Map hidden, show when needed

后端 未结 8 992
北海茫月
北海茫月 2020-12-05 04:34

Is there a way of preventing a Google Maps (JS, v3) map being displayed from the get-go? I\'m doing some pre-processing and would like to show my \'Loading\' spinner until e

8条回答
  •  眼角桃花
    2020-12-05 05:19

    This will work

        google.maps.event.addListener(map, "idle", function ()
        {
            google.maps.event.trigger(map, 'resize');
        });
    

提交回复
热议问题