removeStyleSource method

Future<CommandCompletion> removeStyleSource(
  1. String sourceId
)

Removes a source from the map's style.

See mln_map_remove_style_source in the C API reference.

Errors:

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

Implementation

Future<CommandCompletion> removeStyleSource(String sourceId) => _command(
  (arena, completion) => raw.mln_map_remove_style_source(
    _handle.raw,
    nativeStringView(sourceId, arena).value,
    completion,
    nativeDiagnostic,
  ),
);