removeStyleLayer method

Future<CommandCompletion> removeStyleLayer(
  1. String layerId
)

Removes a layer from the map's style.

See mln_map_remove_style_layer in the C API reference.

Errors:

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

Implementation

Future<CommandCompletion> removeStyleLayer(String layerId) => _command(
  (arena, completion) => raw.mln_map_remove_style_layer(
    _handle.raw,
    nativeStringView(layerId, arena).value,
    completion,
    nativeDiagnostic,
  ),
);