DownloadRegionsStatusListener
public protocol DownloadRegionsStatusListener : AnyObject
Protocol to get notified on status updates when downloading map regions.
-
Called after the download for all requested regions has been completed with success or failure. In this callback, failure represents non-retryable error (eg. authentication failure because of invalid credentials and similars). Temporary failures (eg. network errors) are notified through
onPause(...)and downloads will be in paused state so they can be resumed later. Invoked on the main thread.Declaration
Swift
func onDownloadRegionsComplete(error: MapLoaderError?, regions: [RegionId]?)Parameters
errorRepresents an error in case of a failure. It is
nilfor an operation that succeeds.regionsRepresents a list of regions which has been downloaded. It is
nilin case of an error. -
Called multiple times to indicate the download progress for each requested region individually. Invoked on the main thread.
Declaration
Swift
func onProgress(region: RegionId, percentage: Int32)Parameters
regionRepresents an id of region status update is related to.
percentageRepresents a percentage of data which has been downloaded for particular region.
-
Called when download is paused.
Declaration
Swift
func onPause(error: MapLoaderError?)Parameters
errorPopulated when retryable error is a reason of a pause. It is ‘null’ when pause is called by the user.
-
Called when paused download is resumed.
Declaration
Swift
func onResume()