Open Street Map working offline android

Dimitri picture Dimitri · Feb 10, 2013 · Viewed 24.5k times · Source

I am a newbie to Open Street Map. I made some research and found that we can download and store the map into a folder. But i didn't find any tutorial or sample that provides offline Open Street Map. Can someone provide a step by step tutorial, a guide to implement offline open street map please. I am following this example http://android-coding.blogspot.com/2012/06/example-of-implementing-openstreetmap.html but now i want to make it available when there is no connection.

Answer

L. G. picture L. G. · Mar 5, 2013

Like in the tutorial you mentionned you can use osmdroid library: https://code.google.com/p/osmdroid/

There's a good explanation of how osmdroid works with offline maps here: https://stackoverflow.com/a/8286276/891479

Use MapTileProviderBasic in your app. Some examples here: http://www.androidadb.com/class/ma/MapTileProviderBasic.html

To generate your offline maps in osmdroid format use Mobile Atlas Creator: http://mobac.sourceforge.net/

You can choose the source of the maps and the output format. Once generated, put your maps atlas in zip format into your "/osmdroid/map" directory.

Hope it will help!