Answer the question
In order to leave comments, you need to log in
Yandex map is not displayed in the modal window, how to fix it?
On the internal page, Yandex Maps work fine, for example:
Internal page
I'm trying to display the same Yandex Maps code in a modal window, but the map is not displayed.
For example:
Catalog page with a modal window - the modal window opens when you click on the "Address", for example, the top "Address: Moscow, Dmitrovskoe shosse, 117k1".
The logic of the modal window is as follows:
1) The visitor clicks on the link.
2) A modal window opens.
3) A script with the map loading is inserted into the modal window in innerHTML.
Those. there is no map before the click, it is created by the php script after the link is clicked.
Tell me, please, what could be the matter here?
Answer the question
In order to leave comments, you need to log in
The script with loading the map should be placed at the end of the page, under . Or wrap in
For code to be executed after page load
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question