HTML5离线谷歌地图访问 [英] HTML5 offline google map access

查看:158
本文介绍了HTML5离线谷歌地图访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个HTML5应用程序,它具有Google地图来更改搜索位置。
现在这个应用程序也有一个离线版本。有什么办法可以缓存谷歌地图&当应用程序离线时,它会显示离线版本?



我们如何让用户再次更改位置?

解决方案

目前,Google地图目前没有任何缓存机制,事实上,显式下载的地图切片具有指定的nocache标头(有趣的是,完成对Android版本地图的缓存,但它仍然是实验性的)。为了脱机使用地图,您可能需要推出自己的缓存方案。

随着移动设备的爆炸式增长,以及在使用移动设备时某些时候被断开的可能性,如果Google确实添加了离线浏览功能在未来的某个时间点上绘制地图(可能是v4?)。
$ b 更新

公共问题追踪器中有一项功能请求:



https://code.google.com/p/gmaps-api-issues/issues/detail?id=8914



请为此加分功能请求来表达您的兴趣并从Google获得更多更新。


We are developing a HTML5 application which has a Google map to change the location of search. Now this app has an offline version too. Is there any way i can cache the Google map & when the application is offline, it will show the offline version?

And how could we enable the user to change the location again?

解决方案

There is not currently any caching mechanism in place for google maps, in fact the map tiles that are downloaded explicitly have the nocache header specified (interestingly, there is work being done on caching for the Android version of maps, but it is still experimental). In order to leverage maps offline, you would likely need to roll your own caching scheme.

With the explosion of mobile devices, and the probability of being disconnected at some point while using a mobile device, it wouldn't surprise me if Google did add offline browsing capability to maps at some point in the future though (maybe v4?).

UPDATE:

There is a feature request in the public issue tracker:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=8914

Please star this feature request to express your interest and receive further updates from Google.

这篇关于HTML5离线谷歌地图访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆