Osmdroid - change local map folder

前端 未结 2 1565
眼角桃花
眼角桃花 2021-01-06 12:16

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

2条回答
  •  难免孤独
    2021-01-06 12:32

    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.

提交回复
热议问题