MGLMapSnapshotter
@interface MGLMapSnapshotter : NSObject
A utility object for capturing map-based images.
-
Starts the snapshot creation and executes the specified block with the result.
Declaration
Objective-C
- (void)startWithCompletionHandler: (nonnull MGLMapSnapshotCompletionHandler)completionHandler;
Swift
func start(completionHandler: @escaping MGLMapSnapshotCompletionHandler)
Parameters
completionHandler
The block to handle the result in.
-
Starts the snapshot creation and executes the specified block with the result on the specified queue.
Declaration
Objective-C
- (void)startWithQueue:(nonnull dispatch_queue_t)queue completionHandler: (nonnull MGLMapSnapshotCompletionHandler)completionHandler;
Swift
func start(with queue: DispatchQueue, completionHandler: @escaping MGLMapSnapshotCompletionHandler)
Parameters
queue
The queue to handle the result on.
completionHandler
The block to handle the result in.
-
Cancels the snapshot creation request, if any.
Declaration
Objective-C
- (void)cancel;
Swift
func cancel()
-
Indicates whether as snapshot is currently being generated.
Declaration
Objective-C
@property (readonly, getter=isLoading, nonatomic) BOOL loading;
Swift
var isLoading: Bool { get }