Google maps appcache but NOT offline

◇◆丶佛笑我妖孽 提交于 2020-01-03 00:53:30

问题


i am building a mobile web app (html5, javascript) and i use application cache of html5 for offline capabilities. I have a problem with google maps. I cache all the files i need, and i run my app from application cache. But when i try to use google maps api 3 everything goes wrong (keep in mind i have internet connection, i do not want to use google maps offline). I do not know what to include in the manifest file to make the app get the files needed from the internet. What do i have to include in the manifest file so the GET request of google maps api 3 not to fail.

Thank you all for the responses.

Alkis


回答1:


You can now use:

NETWORK
*

This means all resources not cached will require a connection.




回答2:


In the end i found it here http://blogs.missouristate.edu/web/2010/05/12/google-maps-api-v3-developing-for-mobile-devices/ . I had to include this in the manifest

NETWORK:
http://maps.gstatic.com/
http://maps.google.com/
http://maps.googleapis.com/
http://mt0.googleapis.com/
http://mt1.googleapis.com/
http://mt2.googleapis.com/
http://mt3.googleapis.com/
http://khm0.googleapis.com/
http://khm1.googleapis.com/
http://cbk0.googleapis.com/
http://cbk1.googleapis.com/
http://www.google-analytics.com/
http://gg.google.com/


来源:https://stackoverflow.com/questions/10566871/google-maps-appcache-but-not-offline

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