Offline map using mapsforge in android
Asked Answered
M

1

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.

Meek answered 10/3, 2012 at 9:9 Comment(0)
T
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.

Thant answered 14/3, 2012 at 10:55 Comment(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.Cocci
just put it at the route of the sdcard and it will find it.Depict
What if I want to include the map into an android app package?Electrodialysis
Then you will have to include it as an asset and copy it to local storage before using it.Thant

© 2022 - 2024 — McMap. All rights reserved.