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 JanCol |
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 Richard ♦ Hi. Thanks for the answers. Appreciated. I'm still confused though - sorry... like i say, i'm new to this.
So, I understand that OSM 'provides' the map data. And If you've gotten this far then thanks. I hope you can help point me in the right direction TIA, Jane.
(21 Sep '11, 22:28)
JanCol
1
First of all you need to decide whether you want map tiles (pre-rendered vector images, usually .pngs of 256x256 pixels each) or to draw your own map from vector data. Map tiles are easier to work with for simple map display - the Route-Me library, for example, uses map tiles - but you'll need to identify a server from where you can get them. Once you've decided that, come back and ask us more - right now your question is a bit too open-ended for us to advise more.
(23 Sep '11, 11:40)
Richard ♦
1
Saying more about that : map tiles are simple pre-rendered image files (png or jpg) you can store on your device for the offline mode. But be aware that this requires a lot of storage memory, depending the amount of zooms and the area you want to cover. Storing the vector data is surely an alternative that offers other possibilities like off-line routing but you will have to render the images yourself.
(23 Sep '11, 12:23)
Pieren
|
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 quantumstate |
Have a look at the OSM wiki about Apple iOS and Android ... there are some apps that are opensource. Have a look how they get theit OSM derived data and how they display it. answered 21 Sep '11, 18:34 stephan75 Thanks... a lot to be thinking about. Thanks for the clear and concise answers to my somewhat vague questions. Back to the wiki.again - thanks
(22 Sep '11, 22:26)
JanCol
thanks... like i say a lot to be thinking about. Need to decide first i guess on vector or png-style (raster, i guess) mapping... again, back to the wiki...
(22 Sep '11, 22:28)
JanCol
|