Feature Request: Add ability to pause or stop/cancel Offline Map tile downloading
I'm currently building an app for outdoor recreation so offline map functionality is considered a core feature. Depending on the complexity of the map style and the number of zoom levels requested it can cause the offline map downloads process to take a significant amount of time to complete. Some users may not want to wait this long, so it would be helpful to offer the ability to pause or stop/cancel the ongoing download process. I looked over the documentation and did not see any methods to do so, when I contacted Mapbox support they responded saying this functionality does not currently exist.
I wanted to submit a new feature request as I think the ability to pause or stop/cancel could be beneficial for the majority of projects and would make the offline map downloading process more robust.
We're experiencing the same issue @weifageo, did you have any luck with this?
According to the mapbox docs it should be doable.
Thanks for your the heads up @ferdicus! I've taken a look at the documentation and I'm able to pause the ongoing download using the following line.
offlineRegion.setDownloadState(OfflineRegion.STATE_INACTIVE);
One thing to note however is this Region Name will still appear in your list of Downloaded Regions. In order to create a cancel workflow (ie. stop the download and remove the item) I had to set the Download State as Inactive and also use the Offline Manager to Delete that specific Region for it to remove the downloaded tiles from my device.
Hope this information is helpful!
Is this for Android or iOS?
This is for Android.