简体   繁体   English

如何实现支持Navigation的离线Android Mapbox map?

[英]How to implement offline Android Mapbox map that supports Navigation?

I am implementing application for Android devices and having the problem to implement offline map that works well with showing routes and navigation to the place.我正在为 Android 设备实现应用程序,并且在实现离线 map 时遇到问题,该应用程序可以很好地显示路线和导航到该地点。 I was trying to implement the solution from this link: https://docs.mapbox.com/android/navigation/guides/offline-service/#offline-maps-and-offline-routing But this part of documentation is not clear for me:(我试图从这个链接实现解决方案: https://docs.mapbox.com/android/navigation/guides/offline-service/#offline-maps-and-offline-routing但是这部分文档并不清楚我:(

So far I have downloaded map in this way: https://docs.mapbox.com/android/maps/guides/offline/#metadata This works fine but routes cannot be generated.到目前为止,我已经以这种方式下载了 map: https://docs.mapbox.com/android/maps/guides/offline/#metadata这工作正常,但无法生成路线。 What am I missing?我错过了什么?

Offline Routing is currently re-built by Mapbox.离线路由目前由 Mapbox 重新构建。 That leaves developers the option to do offline navigation only by using the pre-1.0 Navigation SDK versions.这使得开发人员可以选择仅使用 1.0 之前的 Navigation SDK 版本进行离线导航。

To your question:对于你的问题:

Yes, there is a difference in offline map tiles and offline routing tiles.是的,离线 map 切片和离线路由切片存在差异。 You need to download the offline routing tiles, so that the offlineManager can generate a route when offline.您需要下载离线路由瓦片,以便离线管理器在offlineManager时生成路由。

You can check out my implementation of offline navigation here: https://github.com/moritzzzzz/offline_navigation你可以在这里查看我的离线导航实现: https://github.com/moritzzzzz/offline_navigation

This will only work in the test region of the Faroe islands, as no enterprise API token is required for that.这仅适用于法罗群岛的测试区域,因为不需要企业 API 令牌。 If you would like to do offline navigation worldwide, you would have to talk to Mapbox sales to get such an enterprise token.如果您想在全球范围内进行离线导航,则必须与 Mapbox 销售人员交谈以获得这样的企业代币。

Given such a token, the implementation will work worldwide.有了这样的令牌,该实施将在全球范围内运行。

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

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