-
Undocumented
Declaration
Swift
public var peer: MBXPeerWrapper?
-
Notify correct handler
Declaration
Swift
public func notify(for event: MapboxCoreMaps.Event)
-
A
style
object that can be manipulated to set different styles for a snapshotDeclaration
Swift
public private(set) var style: Style { get }
-
Initialize a
Snapshotter
instanceDeclaration
Swift
public init(options: MapSnapshotOptions)
Parameters
observer
Observer responsible for handling lifecycle events in a snapshot
options
Options describing an intended snapshot
-
Reacting to snapshot events.
Declaration
Swift
public func on(_ eventType: MapEvents.EventKind, handler: @escaping (MapboxCoreMaps.Event) -> Void)
Parameters
eventType
The event type to react to.
handler
The block of code to execute when the event occurs.
-
The size of the snapshot
Declaration
Swift
public var snapshotSize: CGSize { get set }
-
Camera configuration for the snapshot
Declaration
Swift
public var camera: CameraOptions { get set }
-
Rectangular bounds to which the snapshot is restricted
Declaration
Swift
public var bounds: CoordinateBounds { get }
-
In the tile mode, the snapshotter fetches the still image of a single tile.
Declaration
Swift
public var tileMode: Bool { get set }
-
Request a new snapshot. If there is a pending snapshot request, it is cancelled automatically.
Declaration
Swift
public func start(overlayHandler: SnapshotOverlayHandler?, completion: @escaping (Result<UIImage, SnapshotError>) -> Void)
Parameters
overlayHandler
The optional block to call after the base map finishes drawing, but before the final snapshot has been drawn. This block provides a
SnapshotOverlayHandler
type, which can be used with Core Graphics to draw custom content directly over the snapshot image.completion
The block to call once the snapshot has been generated, providing a
Result<UIImage, SnapshotError>
type. -
Cancels the current snapshot operation.The callback passed to the start method is called with error parameter set.
Declaration
Swift
public func cancel()
-
Undocumented
See moreDeclaration
Swift
public enum SnapshotError : Error