views:

405

answers:

1

Hi folks,

I'm working on a iPhone offline map project. So i would like to generate the tiles directly in the iPhone, and I need to build a fast and efficient algorithm to render the tiles.

Do you know some resources for that ? (I know some frameworks exist, like mapnik, but i need something as simple as possible, and i'll implement the cool stuff afterwards). I don't mind the language as I will re-invent the wheel for this (except if something perfectly fits : objective c with core data, which i doubt...)

I'm really taling about the graphic generation of the tiles from nodes and paths (i use openstreetmap data, but i would'nt mind arranging the structure if necesary, i really need the fastest way to do it.

Thanks

+1  A: 

Mapnik uses Cairo, and Cairo can be hardware accelerated with Quartz. I don't know if that would work on an iPhone, but if it did that's certainly the path of least resistance. Map rendering is extremely hard, use a library to do it, do NOT reinvent the wheel in this case.

Andrew McGregor
Ok, thanks for the tip. It's apparently written in C, so i think there will be no problem to make it work on the iPhone.But i'm not sure i need it, because i can draw it directly on the iPhone with some Quartz2D no ? I'm just looking for some proper way of doing this.There's also this project : http://gpsmid.sourceforge.net/ which i found interesting, and apparently they don't use any library.
Julien
The hard part of rendering maps isn't the drawing, it's the data handling; you may know this, but in case you don't, GIS information has to be projected before you draw it, and both the projection and datum of your data may need transformed to get it right. And the OpenGFS standard for how features are represented isn't exactly simple either. I look at gpsmid screenshots, and the two things that jump out at me are first, it's really ugly, and secondly, it's also not that precise because you can't do maps right without antialiasing.
Andrew McGregor