Hi, I'm a complete newbie here. Please bear with me. I'm trying to find a way to include offline mapping in my iOS and Android app which effectively plots a GPS position (or many positions/trail) on a map background. I can do this live/on line (if a data connection is available) with, say, Google Maps, but now want to add offline capability.
I have the GPS/positioning (getting and manipulating Lat/Lon data) side of things pretty much sussed but have no idea how to simply/easily offer the capability to plot positions on a pre-downloaded map within my app. I can currently load in, say, an image, and display it but have no idea as to how to then scale said image correctly and pass in a position (Lat/Lon) for display on said 'image'...
Is there an SDK for Android / iOS ? Am I missing something really obvious ? Am I in the right place ? Maybe this has already been done and is now a little passee but I'm really keen to do soemthing with OSM as the map source. Sorry, completely lost !
Can anyone point me in the right direction please ?
asked 21 Sep '11, 14:38
OpenStreetMap doesn't provide a formal SDK. We focus on creating the map data; we don't provide an end-user product or developer tools. We leave that to other people!
For iOS, the most popular map library is RouteMe, which is open source. Bear in mind, however, that if your app uses map images from openstreetmap.org, you absolutely must adhere to the Tile Usage Policy, and that pretty much means using your own server or a third-party one unless you're expecting only miniscule amounts of usage.
You may also find CloudMade's SDKs of interest.
answered 21 Sep '11, 16:03
The map data is provided as whole planet dumps or extracts. See Planet.osm on the wiki for more details. These are quite large files and contain every (current) bit of data is the osm database. For a mobile app you would probably run the data through filters beforehand possibly changing the format as well as discarding unwanted elements. Then you application would have to read the vector data and render it on the mobile device.
This is fairly complex to program, you might find open source programs which can do this already and try to use them.
The other way is to use map tiles which are rendered on a server and sent as pictures (usually png). This is what you see on the main site. You can use the tiles rendered by the openstreetmap servers but there is the Tile Usage Policy mentioned by Richard which doesn't allow mass downloading of tiles for offline use. The solution is to set up your own server to render the tiles (or find another source of tiles with a compatible usage policy).
A disadvantage of this is that the tiles take up quite a lot more storage than the vector data so the offline area would be more restricted. Making a program to display map tiles is much easier and uses less processing power on the device, again you might find an already existing open source program which would help.
answered 22 Sep '11, 14:07