setGlobalStateProperty method

Future<CommandCompletion> setGlobalStateProperty(
  1. String propertyName,
  2. Object? value
)

Sets a value that the style's global-state [expressions](https://maplibre.org/maplibre-style-spec/expressions/) read.

See mln_map_set_global_state_property in the C API reference.

Errors:

  • Status.invalidState while the style isn't loaded, as MapHandle.setStyleUrl() describes.

Implementation

Future<CommandCompletion> setGlobalStateProperty(
  String propertyName,
  Object? value,
) => _command(
  (arena, completion) => raw.mln_map_set_global_state_property(
    _handle.raw,
    nativeStringView(propertyName, arena).value,
    _nativeJsonView(value, arena),
    completion,
    nativeDiagnostic,
  ),
);