queryRenderedFeatures

Queries the map for rendered features.

Return

A cancelable object that could be used to cancel the pending query.

Parameters

geometry

The screen pixel coordinates (point, line string or box) to query for rendered features.

options

The render query options for querying rendered features.

callback

The query features callback called when the query completes.


Queries the map for given descriptor and returns typed FeaturesetFeature list in the callback.

Return

A cancelable object that could be used to cancel the pending query.

Parameters

descriptor

TypedFeaturesetDescriptor object representing either a featureset or a single layer.

geometry

The optional geometry (ScreenCoordinate, ScreenBox or list of ScreenCoordinates) to query for rendered features. Passing NULL is equivalent to passing a bounding box encompassing the entire map viewport.

filter

optional global filter.

callback

The QueryRenderedFeaturesetFeaturesCallback called when the query operation completes.


Queries the map for rendered features.

Note: this is considered to be low-level API and should not be used in majority of use-cases. Instead consider using ClickInteraction, LongClickInteraction to interact with map elements or overloaded queryRenderedFeatures that takes a single TypedFeaturesetDescriptor as an argument and returns a single FeaturesetFeature implementation in the callback.

Return

A cancelable object that could be used to cancel the pending query.

Parameters

geometry

The screen pixel coordinates (point, line string or box) to query for rendered features.

targets

An array of FeaturesetQueryTarget used to filter and query features.

callback

The query features callback called when the query operation completes.