MapFeatureQueryDelegate

Definition of the feature query delegate. Provide interface to query map's features.

interface MapFeatureQueryDelegate

Functions

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

In some cases querying source / render features is expected to be a blocking operation e.g. performing this action on map click. In this case in order to avoid deadlock on main thread querying could be performed on render thread and in that case querying result will be also delivered on render thread not leading to the main thread deadlock. Example:

fun onMapClick() { executeOnRenderThread { queryRenderedFeatures(pixel, options) { // result callback called, do needed actions lock.notify() } } lock.wait() return false }

abstract fun executeOnRenderThread(runnable: Runnable)
hashCode
Link copied to clipboard
open override fun hashCode(): Int
queryRenderedFeatures
Link copied to clipboard

Queries the map for rendered features.

abstract fun queryRenderedFeatures(box: ScreenBox, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
abstract fun queryRenderedFeatures(pixel: ScreenCoordinate, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
abstract fun queryRenderedFeatures(shape: List<ScreenCoordinate?>, options: RenderedQueryOptions, callback: QueryFeaturesCallback)
querySourceFeatures
Link copied to clipboard

Queries the map for source features.

abstract fun querySourceFeatures(sourceId: String, options: SourceQueryOptions, callback: QueryFeaturesCallback)
toString
Link copied to clipboard
open override fun toString(): String

Inheritors

MapboxMap
Link copied to clipboard