Long Click Interaction
Defines the long click interaction.
Refer to static factory methods to create the LongClickInteraction:
Mapbox Standard Style interactive features in defined as
LongClickInteraction.standard<featureset_name>(e.g. LongClickInteraction.Companion.standardPoi).featureset to register the long click interaction for given
featuresetIdand optionalimportId(when defining the interaction for an imported style).layer to register the long click interaction for given
layerId.invoke (meaning empty constructor in Kotlin and static method
mapin Java) to register the long click interaction for the map surface itself.
Long click interaction callback requires returning true | false where true means that the interaction has been consumed and other registered long click interactions will not have the callback invoked and false means that the interactions has not been consumed and other registered long click interactions (if any) will have the callback invoked.
Long click interactions callbacks are fired in determined order:
For unique feature sets defined as FeaturesetDescriptor - the top most rendered feature will trigger the callback first.
LongClickInteraction.invoke (map surface long click interaction outside of all the feature sets) will always get triggered last.
When having several LongClickInteractions with the same FeaturesetDescriptor / map surface (see point 2) - the last registered LongClickInteraction will be triggered first.