T
T
tonybeat2017-04-03 17:31:09
JavaScript
tonybeat, 2017-04-03 17:31:09

How to upload a map to a hidden block?

When the block I need opens, the map is initiated incorrectly.
But if you write in the console, then it will be displayed. Also, if the block is initially open, then the map also loads normally.
google.maps.event.trigger(map, 'resize');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Daniel, 2017-04-03
@Valtasaar

js can't initialize hidden block. Therefore, you need to use hidden instead of display: none, or hide the block in some other way.

Y
Yuri, 2017-04-26
@klyo

If you need, for example, to show your map in a modal window, then start the initialization exactly when the person called this modal window, why load the user in the background what he may not use.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question