queryFeatures

abstract suspend fun queryFeatures(inGeometry: QueryGeometry, layerIds: List<String>? = null): List<QueriedFeature>

Queries rendered features intersecting the given geometry.

Return

A list of QueriedFeature values describing the matched features.

Parameters

geometry

The hit-test geometry in either screen space (.point, .rect) or geographic space (.coordinate).

layerIds

Optional array of layer identifiers to restrict the query to. Pass null to query all visible layers (engine-dependent behavior).

Throws

Any error produced by the underlying map engine's query API.