Manage Downloads
This section lists the methods for managing download tasks by pausing, resuming, canceling, or deleting the regional data. These operations are not atomic i.e. among the two components, map-tiles and route-network, one of them may still succeed even when the combined callback reports an error. Inspect both result objects and refresh observed progress after every operation.
| API | Success result | Fields to inspect |
|---|---|---|
pauseRegion | OfflineRegionPauseData | routeRegion.errorCode; mapTileRegion.action |
resumeRegion | OfflineRegionResumeData | routeRegion.downloadStatus / errorCode; mapTileRegion.action |
cancelRegion | OfflineRegionCancelData | routeRegion.errorCode; mapTileRegion.action |
deleteRegionAllData | OfflineRegionDeleteData | routeRegion.tilesGcDeleted / errorCode; mapTileRegion.action |
Every combined result also contains regionId. A route errorCode of “0” means that no native error was reported and a non-zero value is indicative and should be handled together with the callback error and refreshed progress. mapTileRegion.message is human-readable diagnostic text and may change between SDK versions.
| Map control action | Meaning | Application response |
|---|---|---|
PAUSED | Active or queued map work was paused | Offer “Resume” download |
RESUMED / ENQUEUED | Existing work resumed, or missing work was newly queued | Keep observing progress |
CANCELLED | Active or queued map work was cancelled | Refresh progress. Downloaded files may remain |
DELETED | Stored map data was deleted | Refresh the installed-region list |
ALREADY_IN_PROGRESS | No duplicate work was started | Keep observing the existing task |
ALREADY_COMPLETED | The map package was already complete | Treat the map side as ready after progress confirmation |
ALREADY_PAUSED | The task was already paused | Keep the paused UI state |
NOT_FOUND | No queued task or installed map region matched | Refresh catalog/progress and verify regionId |
For cancelRegion(), routeRegion.tilesGcDeleted is the number of route-tile blobs removed during cancellation cleanup. For deleteRegionAllData(), it is the number removed by deletion. It is not a remaining-tile count. Cancellation may retain downloaded files, but deletion removes stored route and map data.
Do not delete SDK directories directly.