Aemsn
Aemsn

Reputation: 348

Using OpenStreetMap .osm XML data in iOS

I have an iOS app using Google Maps to display a city with POIs. Now I want to offer an offline map too, which a user does not require a data connection to display.

I checked the OpenStreetMap project, and a .osm export of this city is 5MB - perfect for an iOS app. I also checked the routeme library, but there only tiles are used, and no vector data is generated. Is this correct? The file size of the PNG tiles is too big for my app.

Which library makes sense to display OSM-XML data? I know there is cloudmade, but is this the right decision? I'm a bit confused by their licensing model. Any other suggestions? Hints?

Upvotes: 8

Views: 4050

Answers (3)

Ando
Ando

Reputation: 11409

Try skobbler/telenav's sdk based on OSM: http://developer.skobbler.com. You've got offline maps (small vector maps), custom POIs and configurable styles - it should cover your needs.

And the free tier should be enough for you to launch your app and get a couple of users until you'd have to pay.

Upvotes: 1

Graham Asher
Graham Asher

Reputation: 1780

See http://wiki.openstreetmap.org/wiki/Rendering for a list of rendering engines for OSM data (disclaimer: I am the author of one of them). Some are open-source; some (e.g., mine) are free for non-commercial use but closed-source.

You could try using Mapnik, an open-source library, but the OSM page says it is hard to set up. There is a Mapnik view controller for iOS here: https://gist.github.com/2934223.

Any C or C++ code you find out there can of course be used in iOS, because C and C++ are compatible with Objective C; I have found it relatively easy to hook portable C++ code into an iOS app.

Upvotes: 0

rcarver
rcarver

Reputation: 963

Route-me only renders tile data, not vector data.

Cloudmade doesn't have a direct offline library, you have to roll your own. http://support.cloudmade.com/answers/offline-maps

I haven't seen any open source vector map renderers out there, but google search show up one or two closed source renderers.

Upvotes: 0

Related Questions