addStyleSourceJson method
Adds a source to the map's style.
sourceJson is a
[source](https://maplibre.org/maplibre-style-spec/sources/) object.
See mln_map_add_style_source_json in the
C API reference.
Errors:
Status.alreadyExistswhen the style already has a source namedsourceId.Status.invalidStatewhile the style isn't loaded, asMapHandle.setStyleUrl()describes.
Implementation
Future<CommandCompletion> addStyleSourceJson(
String sourceId,
Object? sourceJson,
) => _command(
(arena, completion) => raw.mln_map_add_style_source_json(
_handle.raw,
nativeStringView(sourceId, arena).value,
_nativeJsonView(sourceJson, arena),
completion,
nativeDiagnostic,
),
);