setStyleSourceVolatile method

Future<CommandCompletion> setStyleSourceVolatile(
  1. String sourceId,
  2. bool isVolatile
)

Sets whether a source is volatile.

The map doesn't store the tiles of a volatile source in the persistent cache.

See mln_map_set_style_source_volatile in the C API reference.

Errors:

  • Status.notFound when the style has no source named sourceId.
  • Status.invalidState while the style isn't loaded, as MapHandle.setStyleUrl() describes.

Implementation

Future<CommandCompletion> setStyleSourceVolatile(
  String sourceId,
  bool isVolatile,
) => _command(
  (arena, completion) => raw.mln_map_set_style_source_volatile(
    _handle.raw,
    nativeStringView(sourceId, arena).value,
    isVolatile,
    completion,
    nativeDiagnostic,
  ),
);