setFeatureState method

Future<void> setFeatureState(
  1. String sourceId,
  2. String? sourceLayerId,
  3. String featureId,
  4. String state,
)

Updates entries in the state map of a feature within a style source.

Requirements for featureId: On web, GeoJSON feature ids must be a numeric string — GL JS's internal vector-tile pipeline only supports integer feature ids.

Implementation

Future<void> setFeatureState(
  String sourceId,
  String? sourceLayerId,
  String featureId,
  String state,
) => _impl.setFeatureState(sourceId, sourceLayerId, featureId, state);