GLMapDownloadTask

Objective-C


@interface GLMapDownloadTask : NSObject

Swift

class GLMapDownloadTask : NSObject

GLMapDownloadTask is a class that downloads offline maps. It allows canceling the map download and checking for download errors.

See

[GLMapManager downloadMap:withCompletionBlock:]
  • Unavailable

    GLMapDownloadTask should be created with - [GLMapManager downloadMap:withCompletionBlock:]

    Default -init is disabled.

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;

Properties

  • error is nil if no error occurs. Otherwise, error contains information from the component that failed. Error domain could be ‘CURL’, ‘HTTP’, ‘XZ’, or ‘GLMap’. For more information, check GLMapError.

    Declaration

    Objective-C

    @property (readonly) NSError *_Nullable error;

    Swift

    var error: Error? { get }
  • isCancelled is set to YES when the task is canceled.

    Declaration

    Objective-C

    @property (readonly) BOOL isCancelled;

    Swift

    var isCancelled: Bool { get }
  • The speed of the transfer. NAN if the transfer is not started.

    Declaration

    Objective-C

    @property (readonly) CGFloat speed;

    Swift

    var speed: CGFloat { get }
  • The number of bytes downloaded by the task.

    Declaration

    Objective-C

    @property (readonly) uint32_t downloaded;

    Swift

    var downloaded: UInt32 { get }
  • The total number of bytes to be downloaded by the task.

    Declaration

    Objective-C

    @property (readonly) uint32_t total;

    Swift

    var total: UInt32 { get }
  • map

    GLMapInfo for the map being downloaded.

    Declaration

    Objective-C

    @property (readonly) GLMapInfo *_Nonnull map;

    Swift

    var map: GLMapInfo { get }
  • The data set being downloaded.

    Declaration

    Objective-C

    @property (readonly) GLMapInfoDataSet dataSet;

    Swift

    var dataSet: GLMapInfoDataSet { get }

Methods

  • Cancels the downloading task at any time.

    Declaration

    Objective-C

    - (void)cancel;

    Swift

    func cancel()