setFeatureState method

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

Updates the state object of a feature within a style source.

Update entries in the state object of a given feature within a style source. Only properties of the state object will be updated. A property in the feature state object that is not listed in state will retain its previous value.

Note that updates to feature state are asynchronous, so changes made by this method might not be immediately visible using getStateFeature.

Implementation

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