D
D
dllweb2017-03-03 18:43:15
JavaScript
dllweb, 2017-03-03 18:43:15

Why doesn't Google maps load right away?

The situation is this, in general, there are tabs, in one of the tabs Google maps are loaded, but! For some reason they look like this.
ehenATePQCg.jpg
If you open the firebug, the map starts to appear, what kind of nonsense?
The map is connected via the API, that is, at the end of the body

<script src="https://maps.googleapis.com/maps/api/js?key=мой-ключ-от-апи&libraries=places"></script>

and in the place where the map is initialized
<script>
window.onload = function(){
  initMap();
}
</script>

But it is not at all clear why this is happening? Nothing in the Javascript console, empty!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Falseclock, 2017-03-03
@dllweb

and if so?

document.observe
(
  "dom:loaded", 
  function()
  {
    // put your code here
  } 
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question