public class

VectorTileEventListener

extends Object
java.lang.Object
   ↳ com.carto.layers.VectorTileEventListener

Class Overview

Listener for vector tile element events like clicks etc.

Summary

Public Constructors
VectorTileEventListener()
Public Methods
synchronized void delete()
boolean onVectorTileClicked(VectorTileClickInfo clickInfo)
Listener method that gets called when a click is performed on a vector tile feature.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public VectorTileEventListener ()

Public Methods

public synchronized void delete ()

public boolean onVectorTileClicked (VectorTileClickInfo clickInfo)

Listener method that gets called when a click is performed on a vector tile feature.
If there are multiple vector elements that are located at the click position, then the
results will be sorted by their distance to the camera. The closest element will be called first.
If the method returns true, all subsequent elements are ignored. Otherwise the method is called
on the next element and so on.
This method will NOT be called from the main thread.

Parameters
clickInfo A container that provides information about the click.
Returns
  • True if the click is handled and subsequent elements should not be handled. False if the next element should be called.