Answer the question
In order to leave comments, you need to log in
Display map on page when needed?
Hello Tosturians!
This is the problem, it’s not the first time I’ve encountered it and I don’t know how to solve it correctly: there are maps on the site (several, on different pages), their initialization is written in the general script, when I open a page that does not have a container for some kind of map, it gives an error in the console that it was not possible to do this or that action.
There is a suspicion that beyond the moment where the error is thrown, the script does not execute, how to make it determine whether there is a block on the page and has already initialized it, is this or that block on the page?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question