id property

FeaturesetFeatureId? id
getter/setter pair

An identifier of the feature.

The identifier can be nil if the underlying source doesn't have identifiers for features. In this case it's impossible to set a feature state for an individual feature.

On web, GL JS keeps a GeoJSON feature id only if it is a number, or a string that holds a number. It removes all other string ids, and this field is then null. Android and iOS keep the id. For an id on all platforms, use a number, or copy the id into properties.

Implementation

FeaturesetFeatureId? id;