MBTiles Integration for Custom, Offline Maps on the iPhone and iPad

MBTiles Integration for Custom, Offline Maps on the iPhone and iPad

Open source code allows for more flexibility than Apple’s built-in maps

With the MBTiles example app for the iPhone, we released some powerful open source code that I’d like to discuss in this post. MBTiles is an open, flexible format for storing millions of map tiles in an easily portable package, allowing for completely offline use. We’ve been working with the route-me project (and maintain our own fork of it) for use in our free MapBox for iPad app. But you can use this example code in your own iOS applications too.

The example app puts up a route-me map view using a baked-in MBTiles sample set. From there, you can adapt the code to add markers, paths, map set switching, or anything else you might need. Our idea with this app is to get iOS developers off the ground with a non-MapKit (Apple’s online-only Google Maps library) implementation.

MBTiles iOS example code screenshot

We have also released a KML parsing library and a presentation mirroring library, and will soon be releasing a version of the MapBox iPad app with support for online TileStream layers. Next up we’ll open source the TileStream tile integration code, along with libraries for our recently-announced embedded map interactivity.

We’re really excited about the future of custom mapping on iOS. If you’re using our code, let us know. You can keep up with our work by following @MapBox on Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *