Osmdroid - change the local map folder

I use the standalone version of osmdroid, the cards are placed in sdcard / osmdroid. Do you know how to change the file path? I was looking for their code for processing ZIP files, but I did not find any solution. Has anyone encountered this problem before?

thanks

+4
source share
2 answers

Here you can check the code to create your own version of OSMdroid. Changing the ZIP and local folder is quite possible; I had to do this a few months ago.

Responsibilities for Zips are classes:

org/osmdroid/tileprovider/modules/ZipFileArchive.java org/osmdroid/tileprovider/modules/MapTileFileArchiveProvider.java 
+2
source

If you download the osmdroid: osmdroid-android-3.0.8-sources code package, you can open the OpenStreetMapTileProviderConstants.java class and change the variable like this:

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 in yourfile .

+4
source

Source: https://habr.com/ru/post/1399794/


All Articles