InteractiveFeature

class InteractiveFeature<FS : FeatureState>(val featuresetHolder: FeaturesetHolder<FS>, val feature: Feature, val featureNamespace: String?, val state: FS)

The interactive feature object returned in the callback of interactions either interactions (ClickInteraction, LongClickInteraction) or MapboxMap.queryRenderedFeature.

Constructors

Link copied to clipboard
fun <FS : FeatureState> InteractiveFeature(featuresetHolder: FeaturesetHolder<FS>, feature: Feature, featureNamespace: String?, state: FS)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Override equals method.

Link copied to clipboard
open override fun hashCode(): Int

Override hashCode method.

Properties

Link copied to clipboard
val feature: Feature

The interactive feature data (id, geometry, properties as JSON) encapsulated in the Feature object.

Link copied to clipboard

Optional feature namespace.

Link copied to clipboard

The FeaturesetHolder this concrete interactive feature comes from. List of supported featuresets could be found in the nested classes (e.g. FeaturesetHolder.Featureset, FeaturesetHolder.Layer).

Link copied to clipboard
val state: FS

Current interactive feature state stored as a concrete instance of FeatureState. Note that this state is immutable and represents the interactive feature state at the precise moment of the interaction callback.