Manage Downloads

Use the following scripts to control routing data and map tile download tasks for a region:

  1. To pause a download that supports pausing:
1
try await NBNavigation.pauseRegionDownload(regionId: regionId)
  1. To resume a download:
1
try await NBNavigation.resumeRegionDownload(regionId: regionId)
  1. To cancel (stop) a download:
1
try await NBNavigation.cancelRegionDownload(regionId: regionId)
  1. To delete routing and the map data for a region:
1
try await NBNavigation.deleteRegionAllData(regionId: regionId)
OperationEffectDeletes completed data
pausePauses downloads that support pausingNo
resumeContinues paused or resumable downloadsNo
cancelCancels or stops the queued or running tasksDoes not guarantee deletion of existing complete packages
deleteDeletes local routing and map data for the regionYes

pauseRegionDownload and resumeRegionDownload act on both routing and map tasks but return the routing-side result.

Use pauseRegionWithDetails and resumeRegionWithDetails to inspect both subtask results.

Use manageOfflineRegion to control only one dataset.