Keep a Google Maps v3 Map hidden, show when needed

后端 未结 8 997
北海茫月
北海茫月 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:16

    Also remember to call:

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

    if you have changed the size of the

    . A display:none
    has no size.

提交回复
热议问题