5

How can i implement offline map in android. I tried it with mapsforge library. It does not provides binary map file for Wisconsin state. So How can create my own map binary file ?

Thanks in advance.

1 Answer 1

8

You will need two things:

  1. a program that allows you to use the mapsforge library. Concerning this, you can stick with the program called AdvancedMapViewer which comes as an example with the library.

  2. a mapfile. Bascially you have to create your own mapfile from OpenStreetMap data. This is done with a plugin for Osmosis. This plugin is described here:

https://github.com/mapsforge/mapsforge/blob/master/docs/Getting-Started-Map-Writer.md

In short it works like this:

then put the created file wisconsin.map on your device and load it from AdvancedMapViewer.

4
  • Could you please add information where to put the file on the device? I suppose there is a default location where mapsforge tries to find the files.
    – hgoebl
    May 28, 2014 at 11:19
  • just put it at the route of the sdcard and it will find it.
    – Bear
    Jun 5, 2014 at 11:01
  • What if I want to include the map into an android app package?
    – Bakaburg
    Aug 17, 2015 at 7:26
  • Then you will have to include it as an asset and copy it to local storage before using it.
    – sebkur
    Sep 14, 2015 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.