Google maps does not initialize first time [closed]

↘锁芯ラ 提交于 2019-12-12 02:22:50

问题


i gave link page with google maps when i clicked map link it opens page but does not initialize google maps.But when i refresh page it initialize page you can click map link in the footer

it will open that page but without initialize google maps but if you refresh page it will initialize what should i do to find problem?


回答1:


I'm not very familiar with jquery-mobile, but I guess 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 content of the div with data-role="page" will be loaded into the page.

Your scripts(especially the one that initializes the map) currently are not located inside this div, therefore they will not be loaded or executed.



来源:https://stackoverflow.com/questions/15752264/google-maps-does-not-initialize-first-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!