V
V
Valentin Popov2016-11-21 15:10:09
JavaScript
Valentin Popov, 2016-11-21 15:10:09

Why is the map not showing up right away?

Faced such a problem. I made two maps on the site, only they are displayed by clicking on a certain button. But the problem is that by clicking on the button I get a block with information, but the map is not displayed, it is only necessary to make some manipulations with the browser window, for example, slightly reduce it, and the map appears immediately. Tell me where to dig so that it is immediately displayed?

<button type="button" id="lar-btn-voronez" onclick="document.getElementById('voronez-map').style.display='block';document.getElementById('samara-map').style.display='none'">Воронеж</button>
<button type="button" id="lar-btn-samara" onclick="document.getElementById('voronez-map').style.display='none';document.getElementById('samara-map').style.display='block'">Самара</button>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yanchevsky, 2016-11-21
@deniscopro

As far as I remember, in the case of Google Maps, you need to call
after the block appears.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question