Search code examples
androidmapboxmapbox-android

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. 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 :(

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. What am I missing?


Solution

  • Offline Routing is currently re-built by Mapbox. That leaves developers the option to do offline navigation only by using the pre-1.0 Navigation SDK versions.

    To your question:

    Yes, there is a difference in offline map tiles and offline routing tiles. You need to download the offline routing tiles, so that the offlineManager can generate a route when offline.

    You can check out my implementation of offline navigation here: 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. If you would like to do offline navigation worldwide, you would have to talk to Mapbox sales to get such an enterprise token.

    Given such a token, the implementation will work worldwide.