简体   繁体   English

在应用程序中离线使用谷歌地图

[英]Use google maps offline in an app

I'm trying to develop and app that overlays some information on a google map.我正在尝试开发和应用程序来覆盖谷歌 map 上的一些信息。

I was wondering, if it is possible to cache at least a portion of this map, so that it could be used offline.我想知道,是否可以缓存这个 map 的至少一部分,以便可以离线使用。

You can use an OpenStreetMaps controller (like osmdroid ) and Google Maps tiles.您可以使用 OpenStreetMaps controller(如osmdroid )和 Google 地图图块。 According to the Google Maps TOS (10.1.3.b), it seems that you can use a portion of maps if you cache it temporarily and securely.根据Google Maps TOS (10.1.3.b),如果您暂时安全地缓存它,似乎您可以使用部分地图。 Read more at this tutorial . 在本教程中阅读更多内容

You won't have the permission to do that, as stated in Downloading/Caching Google Maps for Offline Use .下载/缓存 Google 地图以供离线使用中所述,您将无权执行此操作。 However you could use the maps of OpenStreetMap or other providers who will allow this.但是,您可以使用 OpenStreetMap 或其他允许这样做的提供者的地图。

A status update in 2016: 2016 年的状态更新:

Things have moved on in OSM world, and you can now get maps that are at least as good as the ones Google Maps provide using various SDK's. OSM 世界中的事情已经发生了变化,您现在可以使用各种 SDK 获得至少与 Google Maps 提供的地图一样好的地图。 One of those is Mapbox Android SDK , which is vector based, and allows you to both cache things offline, and use them with a data connection.其中之一是Mapbox Android SDK ,它是基于矢量的,它允许您离线缓存内容,并将它们与数据连接一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM