4

Is it possible to read .mbtiles files through Mapbox iOS or Android SDK?

I'm trying to download .mbtiles from osm2vectortiles.org and setting up a full offline application running offline maps.

3 Answers 3

2

MBTiles can be displayed in the Mapbox Maps iOS SDK by hosting a web server within your app and pointing the map to localhost. I've posted my solution here:

https://gist.github.com/namannik/3b7c8b69c2d0768d0c2b48d2ed5ff71c

I'm sure this same sort of thing could be done on Android as well.

1
  • 1
    Welcome to GIS SE. As a new user, please take the Tour. This appears to be a link-mostly solution. Answers here are expected to be sufficiently standalone that the external link could fail and enough information would still be present to prevent compromise of the answer's value. Please Edit your answer.
    – Vince
    Commented Jan 1, 2018 at 0:03
1

This kind person has provided a similar solution for Android as is mentioned by Alan. It uses as local server (JPG/PNG/PBF etc) as the tile srouce reading from your local mbtiles files. I haven't implemented this, but from a brief reading it seems sound:

https://gist.github.com/typebrook/7d25be326f0e9afd58e0bbc333d2a175

0

Yes, it is possible. See "OpenMapTiles" app on Google Play or App Store.

We can provide you with the source code of our sample mobile app which is able to read MBTiles offline directly. Contact [email protected].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.