create static method

Future<Snapshotter> create({
  1. required MapSnapshotOptions options,
  2. OnStyleLoadedListener? onStyleLoadedListener,
  3. OnMapLoadErrorListener? onMapLoadErrorListener,
  4. OnStyleDataLoadedListener? onStyleDataLoadedListener,
  5. OnStyleImageMissingListener? onStyleImageMissingListener,
})

Creates a new Snapshotter configured with the given options.

Set the style via setStyleURI / setStyleJSON before calling start.

Implementation

static Future<Snapshotter> create({
  required MapSnapshotOptions options,
  OnStyleLoadedListener? onStyleLoadedListener,
  OnMapLoadErrorListener? onMapLoadErrorListener,
  OnStyleDataLoadedListener? onStyleDataLoadedListener,
  OnStyleImageMissingListener? onStyleImageMissingListener,
}) async {
  final impl = await MapboxMapsFlutterPlatform.instance.createSnapshotter(
    options: options,
    onStyleLoadedListener: onStyleLoadedListener,
    onMapLoadErrorListener: onMapLoadErrorListener,
    onStyleDataLoadedListener: onStyleDataLoadedListener,
    onStyleImageMissingListener: onStyleImageMissingListener,
  );
  return Snapshotter(impl);
}