应用程序如何使用在Android 4+的谷歌离线地图?

编程入门 行业动态 更新时间:2024-10-24 08:20:56
本文介绍了应用程序如何使用在Android 4+的谷歌离线地图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

Android有配版(4 +?)推出离线地图,我可以在手机上选择一个区域来缓存,然后谷歌地图的下载在手机上的数据映射。

随着我留言:我想使用的数据,这已经是我的设备上(如果用户已经做了离线地图下载使用前)。并没有开放给谷歌的服务器一个新的数据连接(例如,由于数据费将适用)。

我能否使用我的应用程序内的地图数据 - 例如,通过发送地图应用的意图确实显示的区域(也许覆盖)?或者使用连地图工具我的应用程序里面?

我说的不是下载从谷歌服务器的一些瓦片到我的应用程序

解决方案   

我能否使用我的应用程序内的地图数据 - 例如,通过发送地图应用的意图确实表现出一个区域(可能覆盖)?

好了,你可以通过调用地图应用 ACTION_VIEW 和地理: 意图。至于这是否会查看一些缓存区域取决于用户使用什么样的地图应用程序和用户是否缓存在你指定的经度和纬度的区域。

  

或者使用连地图工具我的应用程序里面?

虽然你可以在你的应用程序集成图形页面,也不会使用该缓存数据。部分,这是因为图形页面 code predates任何这种缓存的东西。部分,这是因为缓存的数据被另一个进程(地图应用)所拥有,因此无法访问你。

Android has with version (4+ ?) introduced offline maps where I can on the handset select an area to cache and then Google Maps downloads that map data on the handset.

As I got a comment: I want to use the data, that is already on my device (if the user has done the downloading for offline maps use before). And not open a new data connection to Google's servers (e.g. because data charges would apply).

Can I use that map data from within my app - e.g. by sending the maps app an intent do show an area (perhaps with overlays)? Or use even the map widget inside my app?

I am not talking about downloading some tiles from the Google servers into my app

解决方案

Can I use that map data from within my app - e.g. by sending the maps app an intent do show an area (perhaps with overlays)?

Well, you can invoke a map application using ACTION_VIEW and a geo: Intent. Whether that will view some cached area depends on what map app the user uses and whether or not the user cached the area around your specified latitude and longitude.

Or use even the map widget inside my app?

While you can integrate a MapView in your app, it will not use this cached data. Partially, that is because the MapView code predates any of this caching stuff. Partially, that is because the cached data is owned by another process (the Maps app) and therefore is inaccessible to you.

更多推荐

应用程序如何使用在Android 4+的谷歌离线地图?

本文发布于:2023-10-25 22:16:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1528263.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:离线   如何使用   应用程序   地图   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!