Function getFeatureState

  • Sets or removes a feature state. The feature state is taken into account for styling, just like the feature's properties, and can be used e.g. to conditionally render selected features differently.

    Parameters

    • mapOrLayer: Map | VectorLayer<any> | VectorTileLayer<any>

      Map or layer to set the feature state on.

    • feature: FeatureIdentifier

      Feature identifier.

    Returns any

    Feature state or null when no feature state is set for the given feature identifier.