0

My question is specific to Google maps v3 API. I have a header (h3), an image, and Google Maps on my page. I want the page to wait until my Google Map loads entirely. Currently, the browser displays the h3 and image before Google Maps has completely loaded.

rjatkinson
  • 498
  • 4
  • 11
ATP
  • 832
  • 1
  • 15
  • 29

2 Answers2

1

You might be able to use an event listener to see when the google map becomes idle. Then once that event is fired you can add your other html through the JavaScript.

Here is a link to a similar question and answer: How can I check whether Google Maps is fully loaded?

Community
  • 1
  • 1
Spazmoe06
  • 152
  • 7
1

The event you need is idle, as @Spazmoe06 told you, and you can use it like this :

google.maps.event.addListenerOnce(map, 'idle', function(){
    // ...
});

You can find a list of all Google Maps events here.

AlexB
  • 7,302
  • 12
  • 56
  • 74