identify

suspend fun identify(graphicsOverlay: GraphicsOverlay, screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<IdentifyGraphicsOverlayResult>

Initiate an Identify operation on the specified graphicsOverlay.

The tolerance parameter determines the extent of the region used during the identify operation. Any graphics that intersect this test region when rendered are returned, up to the maximumResults limit. A tolerance of 0 tests just the physical pixel at screenCoordinate. Tolerance values above 0 are in Dp and specify a circular region centered on screenCoordinate, with radius equal to tolerance. The maximum allowed tolerance value is 100 Dp, resulting in an identify circle of diameter 200 Dp.

The returnPopupsOnly parameter controls what properties are populated in the IdentifyGraphicsOverlayResult instance that is returned by the identify operation:

  • true: only the IdentifyGraphicsOverlayResult.popups property will be populated with results. If the overlay does not have popups an error will be returned.

  • false: the IdentifyGraphicsOverlayResult.graphics property will be populated, and the IdentifyGraphicsOverlayResult.popups property will be populated if the overlay has popups.

Return

A Result containing an IdentifyGraphicsOverlayResult, or failure

Since

200.4.0

Parameters

graphicsOverlay

overlay on which to run the identify

screenCoordinate

location at which to run identify in screen coordinates

tolerance

extent of the region used during the identify operation

returnPopupsOnly

whether the graphics property of the result is populated

maximumResults

maximum size of the result set of graphics to return. A null value indicates unlimited results


suspend fun identify(layer: Layer, screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<IdentifyLayerResult>

Initiate an Identify operation on the specified layer.

The tolerance parameter determines the extent of the region used during the identify operation. Any GeoElements that intersect this test region when rendered are returned, up to the maximumResults limit. A tolerance of 0 tests just the physical pixel at screenCoordinate. Tolerance values above 0 are in Dp and specify a circular region centered on screenCoordinate, with radius equal to tolerance. The maximum allowed tolerance value is 100 Dp, resulting in an identify circle of diameter 200 Dp. The returnPopupsOnly parameter controls what properties are populated in the IdentifyLayerResult instance that is returned by the identify operation:

  • true: only the IdentifyLayerResult.popups property will be populated with results. If the layer does not have popups an error will be returned.

  • false: the IdentifyLayerResult.geoElements property will be populated. The IdentifyLayerResult.popups property will be populated if the layer has popups.

Return

A Result containing an IdentifyLayerResult, or failure

Since

200.4.0

Parameters

layer

layer on which to run the identify

screenCoordinate

location at which to run identify in screen coordinates

tolerance

extent of the region used during the identify operation

returnPopupsOnly

whether the IdentifyLayerResult.geoElements property of the result is populated

maximumResults

maximum size of the result set of GeoElements (element type dependent on target layer) to return per layer or sublayer. A null value indicates unlimited results