I've been looking through the API but I could not find anything. Is this possible? Is there an API to change where map tiles are stored?
@diegolaballos could you specify for which platform?
On Android we expose
<!-- Setting to switch to external storage (and disable internal) in your app -->
<meta-data -->
android:name="com.mapbox.SetStorageExternal"
android:value="true" />
Which you can add as part of your manifest
Thanks @tobrun Yeah, sorry I forgot to specify the platform. And yes I'm talking about Android.
But this is just a boolean setting. I can only switch from internal to external but I can't specify a custom folder in the external storage. Or am I wrong?
But this is just a boolean setting. I can only switch from internal to external but I can't specify a custom folder in the external storage.
@diegolaballos Correct. At the moment it doesn't let you specify a path, it's just a switch between internal and external storage. Would this work in your case? If not, could you share a bit more about your use-case? Thanks!
@zugaldia The idea is to give the user the possibility to change the folder where his offline maps (map tiles) are stored. I guess this is not possible at this moment, right? Thanks!!
@diegolaballos Correct, not at the moment. The closest we have is the possibility to merge offline databases from different paths into the main database using OfflineManager.mergeOfflineRegions(String path, OfflineManager.MergeOfflineRegionsCallback callback) but it isn't quite the same. Let's keep this ticket open to track this feature request, thanks for the feedback!
We are also interested in this feature and thinking about to implement it and create a pull request. Do you have some thoughts about the implementation already? It would be great to change the path at runtime.
@LukasPaczos now that https://github.com/mapbox/mapbox-gl-native/pull/13707 landed, are we good to close here?
Yes, the feature has been shipped in the v7.3.0 :tada:
Most helpful comment
@diegolaballos Correct, not at the moment. The closest we have is the possibility to merge offline databases from different paths into the main database using
OfflineManager.mergeOfflineRegions(String path, OfflineManager.MergeOfflineRegionsCallback callback)but it isn't quite the same. Let's keep this ticket open to track this feature request, thanks for the feedback!