MapUpdateProgressListener

public protocol MapUpdateProgressListener : AnyObject

Protocol to get notified on status updates when updating map data, previously downloaded by MapDownloader.

  • Called multiple times to indicate the update progress. Invoked on the main thread.

    Declaration

    Swift

    func onProgress(region: RegionId, percentage: Int32)

    Parameters

    region

    Represents an id of region status update is related to.

    percentage

    Represents a percentage of map data which has been updated.

  • Called when update is paused. Invoked on the main thread.

    Declaration

    Swift

    func onPause(error: MapLoaderError?)

    Parameters

    error

    Populated when a retryable error is the reason for a pause. A retryable error can happen, when, for example, the HERE SDK tries too often to resume a download that was paused due to a lost connection. In general, the HERE SDK will try a few times, before the update is paused. This error value gives a hint on the reason for the necessary retry operation. A paused download can be resumed by the user at a later time. It is ‘null’ when MapUpdateTask.pause(Bool) was called by the user.

  • Called after the update process for all regions has been completed. Invoked on the main thread.

    Declaration

    Swift

    func onComplete(error: MapLoaderError?)

    Parameters

    error

    Represents an error in case of a failure. If an error occurs, the operation cannot be resumed later. It is nil for an operation that succeeds.

  • Called when a paused map update is resumed.

    Declaration

    Swift

    func onResume()