سؤال

I am using offline version of osmdroid, maps are placed in sdcard/osmdroid. Do you know, how to change the file path? I have been searching through their code for handling ZIP files but I haven't found any solution. Anyone faced this issue before?

Thx

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top