ClickInteraction

Defines the click interaction.

Refer to static factory methods to create the ClickInteraction:

  1. featureset to register the click interaction for given featuresetId and optional importId (when defining the interaction for an imported style).

  2. layer to register the click list interaction for give layerId.

  3. invoke (meaning empty constructor in Kotlin and static method map in Java) to register the click interaction for the map surface itself.

Click interaction callback requires returning true | false where true means that the interaction has been consumed and other registered click interactions will not have the callback invoked and false means that the interactions has not been consumed and other registered click interactions (if any) will have the callback invoked.

Click interactions callbacks are fired in determined order:

  1. For unique feature sets defined as FeaturesetDescriptor - the top most rendered feature will trigger the callback first.

  2. ClickInteraction.invoke (map surface click interaction outside of all the feature sets) will always get triggered last.

  3. When having several ClickInteractions with the same FeaturesetDescriptor / map surface (see point 2) - the last registered ClickInteraction will be triggered first.

Types

Link copied to clipboard
object Companion

Static variables and methods.