Home > @magiclane/maps-sdk > GemView > getLayersIdsAt

GemView.getLayersIdsAt() method

Get the style layers that rendered content at the given screen position.

Style-layer hit test: returns the ids/names of the map style layers that painted the pixel — including area, land and water fills, which the cursor selection API does not report. Equivalent to the legacy JS API's getLayersIdsAt: the screen point is converted with , then the style layer info is queried at the resulting coordinates.

Signature:

getLayersIdsAt(screenCoordinates: Point): StyleLayerInfo[];

Parameters

Parameter

Type

Description

screenCoordinates

Point

Screen point in the same coordinate space as .

Returns:

StyleLayerInfo[]

The style layers that rendered content at the point, or an empty list when none did.

Exceptions

An exception if it fails.