GLMapDownloadTask
Objective-C
@interface GLMapDownloadTask : NSObject
Swift
class GLMapDownloadTask : NSObject
GLMapDownloadTask
is a class that downloads offline maps. It allows to cancel map download and check download error.
See
[GLMapManager downloadMap:withCompletionBlock:]
-
Unavailable
GLMapDownloadTask should be created with -
[GLMapManager downloadMap:withCompletionBlock:]
Plain -init is disabled
Declaration
Objective-C
- (instancetype _Nonnull)init;
-
error
is nil if no error happens. Otherwise error contains information from 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: Error? { get }
-
isCancelled
set toYES
when task was cancelled.Declaration
Objective-C
@property (readonly) BOOL isCancelled;
Swift
var isCancelled: Bool { get }
-
Speed of transfer. NAN if transfer is not started.
Declaration
Objective-C
@property (readonly) CGFloat speed;
Swift
var speed: CGFloat { get }
-
Bytes downloded by task
Declaration
Objective-C
@property (readonly) uint32_t downloaded;
Swift
var downloaded: UInt32 { get }
-
Total bytes to downloded by task
Declaration
Objective-C
@property (readonly) uint32_t total;
Swift
var total: UInt32 { get }
-
Data set being downloaded
Declaration
Objective-C
@property (readonly) GLMapInfoDataSet dataSet;
Swift
var dataSet: GLMapInfoDataSet { get }
-
Cancels downloading task at any time
Declaration
Objective-C
- (void)cancel;
Swift
func cancel()