Snapshotter
A high-level component responsible for taking map snapshots with given MapSnapshotOptions
.
-
A
style
object that can be manipulated to set different styles for a snapshot -
Initialize a
Snapshotter
instance -
The size of the snapshot
-
The current camera state of the snapshotter
-
Sets the camera of the snapshotter
-
In the tile mode, the snapshotter fetches the still image of a single tile.
-
Request a new snapshot. If there is a pending snapshot request, it is cancelled automatically.
-
Cancels the current snapshot operation.The callback passed to the start method is called with error parameter set.
-
Returns the coordinate bounds corresponding to a given
CameraOptions
-
Calculates a
CameraOptions
to fit a list of coordinates.
-
Subscribes an observer to a list of events.
Snapshotter
holds a strong reference toobserver
while it is subscribed. To stop receiving notifications, pass the sameobserver
tounsubscribe(_:events:)
.Note
Prefer
onNext(_:handler:)
andonEvery(_:handler:)
to using this lower-level APIs -
Unsubscribes an observer from a list of events.
Snapshotter
holds a strong reference toobserver
while it is subscribed. To stop receiving notifications, pass the sameobserver
to this method as was passed tosubscribe(_:events:)
. -
Listen to a single occurrence of a Map event.
This will observe the next (and only the next) event of the specified type. After observation, the underlying subscriber will unsubscribe from the map or snapshotter.
If you need to unsubscribe before the event fires, call
cancel()
on the returnedCancelable
object. -
Listen to multiple occurrences of a Map event.
-
Clears temporary map data.
Clears temporary map data from the data path defined in the given resource options. Useful to reduce the disk usage or in case the disk cache contains invalid data.
Note
Calling this API will affect all maps that use the same data path and does not affect persistent map data like offline style packages.