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;
-
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, checkGLMapError
.See
GLMapError
Declaration
Objective-C
@property (readonly) NSError *_Nullable error;
Swift
var error: (any Error)? { get }
-
isCancelled
is set toYES
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 }
-
The data set being downloaded.
Declaration
Objective-C
@property (readonly) GLMapInfoDataSet dataSet;
Swift
var dataSet: GLMapInfoDataSet { get }
-
Server ID
Declaration
Objective-C
@property (readonly) NSString *_Nullable serverID;
Swift
var serverID: String? { get }
-
Cancels the downloading task at any time.
Declaration
Objective-C
- (void)cancel;
Swift
func cancel()