21

I'm looking into a solution that will allow to use OpenStreetMap data to render a 2D top-view vector-based map in iOS, instead of using pre-rendered tiles from a server. Similar to Apple and Google Maps in iOS6+.

I've done extensive research on this matter, but didn't found too much information.
There are a number of iOS apps that do this, but no information on how they implement it. A couple of these apps are:

The first 2 apps work similar to Apple and Google Maps. The map is drawn in real time whenever the zoom changes.
The last one appears to be using a slightly different approach. It renders the vector data at specific zoom levels and creates tiles which are then used as normal tiles downloaded from a tile server. So the rendering engine could actually be a tile source for the Route-Me library, but instead of downloading the tiles it renders them on the fly.

The first method is preferred.

[Q] I guess one could switch between methods fairly easy, once the OpenGL ES renderer is in place. I mean you could use the renderer as a source for Route-Me to create tiles, or you could use it as a real-time drawer, similar to a game. Am I right?

The closest solution I found is OpenStreetPad. However, it is using Core Graphics instead of OpenGL ES, so the rendering is not hardware accelerated.

Mapbox stated they are working on vector tiles and they'll probably provide an iOS solution for rendering, however it may use Mapnik so I am not sure how efficient will that be. And there's no ETA on since mid 2013.

[Q] Do you know of any other libraries, papers, guides, examples, or some other useful information on how to approach this? Basically how to handle the OSM data and how to actually use OpenGL ES / GLKit to draw that data on the device. Maybe some of the people who have done it can share a few things?

Calin
  • 2,110
  • 1
  • 21
  • 36
  • Hey @Calin, i was wondering which solution did you finally choose ? I'm still in the research phase but i'm a bit confused. – manar Jul 26 '13 at 07:08
  • @manar I couldn't find any good solution as far as the implementation goes. As for the end result, the ForeverMap 2 app is the closest to what I need, mainly because it has a fully vector rendering engine, like Google or Apple Maps. Given all this, I think my best shot is to write the rendering engine from scratch, using Apple technologies. So far this looks like a daunting task, and any help is still much appreciated. I'm hoping this question will get some helpful answers eventually, to make things a bit easier. – Calin Jul 27 '13 at 07:05
  • thanks for your answer, you should take a look at Mapnik, it's not proprietary ;) but the implementation seems to be tricky. – manar Jul 29 '13 at 02:51
  • Yes, I know Mapnik is open-source. However it may prove more difficult to understand its implementation without any real documentation, than actually implementing it. Also Mapnik has many features I don't need, at least in the early stages of development. And these features make things more complicated. – Calin Jul 29 '13 at 05:58

3 Answers3

5

Old question, but there's a new answer. WhirlyGlobe-Maply will render tile based vector maps on iOS. http://mousebirdconsulting.blogspot.com/2014/03/vector-maps-introduction.html

mousebird
  • 1,029
  • 9
  • 18
2

The technology that powered skobbler's ForeverMap 2 and their current GPS Nav & Maps app is now available on a pay-per use basis. See their developer platform. Note: they also have a free tier that can be used to develop/launch small apps.

They render the map using OpenGL and "vector data tiles". This vector data tiles contain information regarding road geometry (so you can have routing), POI data & other map features. (eg. boundary limits).

Community
  • 1
  • 1
SylviA
  • 1,577
  • 9
  • 13
1

There is a list of OSM-based applications for iOS. It also includes a few open source projects, for example Navit. Navit seems to render the map using SDL/OpenGL. See the Navit iOS wiki page for more information.

scai
  • 20,297
  • 4
  • 56
  • 72
  • Interesting.. unfortunately Navit is the only open source app on that page, and it's a cross platform app, which is a good thing obviously, but I'm more interested in an iOS-only technology, to be able to take advantage of some very cool iOS frameworks, like GLKit. Worth investigating though. Thanks – Calin May 08 '13 at 15:17
  • I guess once you have figured out how to retrieve/process raw OSM data there is nothing special in rendering OSM roads using GLKit compared to rendering something else using GLKit. – scai May 10 '13 at 16:33