Osmdroid - change local map folder

霸气de小男生 提交于 2019-11-30 22:54:36

Here you can check out the code to build your own version of OSMdroid. Changing ZIP and local folder is totally possbile, had to do it myself a few months ago.

Responsible for the Zips are this classes:

org/osmdroid/tileprovider/modules/ZipFileArchive.java
org/osmdroid/tileprovider/modules/MapTileFileArchiveProvider.java
Gallery

If you download the package of code about osmdroid: osmdroid-android-3.0.8-sources, you can open the class OpenStreetMapTileProviderConstants.java and modify the variable in this way:

modify

public static final File OSMDROID_PATH = new File("/mnt/sdcard/osmdroid");

to*

public static final File OSMDROID_PATH = new File("/mnt/ext_sdcard/yourfile");

Then put your map tiles into yourfile.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!