getFeatureState method

Future<String> getFeatureState(
  1. String sourceId,
  2. String? sourceLayerId,
  3. String featureId
)

Returns the state map of a feature within a style source as a JSON string.

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<String> getFeatureState(
  String sourceId,
  String? sourceLayerId,
  String featureId,
) => _impl.getFeatureState(sourceId, sourceLayerId, featureId);