Snapshotter class

Captures styled map snapshots without a live MapWidget.

Properties

hashCode int
The hash code for this object.
no setterinherited
onMapLoadErrorListener OnMapLoadErrorListener?
Event listener invoked when a map load error occurs.
no setter
onStyleDataLoadedListener OnStyleDataLoadedListener?
Event listener invoked when style data has been loaded.
no setter
onStyleImageMissingListener OnStyleImageMissingListener?
Event listener invoked when the style has a missing image.
no setter
onStyleLoadedListener OnStyleLoadedListener?
Event listener invoked when the style has been fully loaded.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style StyleManager
Style manager for the snapshotter — set the style URI/JSON and mutate runtime style properties (import configs, layers, sources).
latefinal

Methods

camera({required List<Point> coordinates, MbxEdgeInsets? padding, double? bearing, double? pitch}) Future<CameraOptions>
Returns camera options that fit the given list of coordinates.
cancel() Future<void>
Cancels any pending snapshot request.
clearData() Future<void>
Clears temporary map data from the snapshotter's data path.
coordinateBounds(CameraOptions camera) Future<CoordinateBounds>
Returns the coordinate bounds corresponding to the given camera options.
dispose() Future<void>
Releases resources held by this snapshotter instance.
getCameraState() Future<CameraState>
Returns the current snapshotter camera state.
getSize() Future<Size?>
Returns the current snapshot image size.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCamera(CameraOptions cameraOptions) Future<void>
Sets the camera to the given options.
setSize(Size size) Future<void>
Sets the snapshot image size.
start() Future<Uint8List?>
Captures a snapshot. If a pending request exists it is cancelled first.
tileCover(TileCoverOptions options) Future<List<CanonicalTileID?>>
Returns tile identifiers covering the current snapshotter camera.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create({required MapSnapshotOptions options, OnStyleLoadedListener? onStyleLoadedListener, OnMapLoadErrorListener? onMapLoadErrorListener, OnStyleDataLoadedListener? onStyleDataLoadedListener, OnStyleImageMissingListener? onStyleImageMissingListener}) Future<Snapshotter>
Creates a new Snapshotter configured with the given options.