Google maps are not initialized for the first time

I gave a link to a google maps page. When I clicked on a map link, it opens the page, but does not initialize Google maps. But when I refresh the page, it initializes the page,   you can click on the map link in the footer

it will open this page , but without initializing Google maps, but if you refresh the page, it initializes what should I do to find the problem?

0
source share
1 answer

I am not very familiar with jquery-mobile, but I think that when a page is loaded via AJAX (and the page will be loaded via AJAX in this case, when you click the button), only the contents of the div with data-role="page"will be loaded onto the page.

Currently your scripts (especially those that initialize the map) are not inside this div, so they will not be loaded or executed.

0
source

All Articles