identifyLayers

suspend fun identifyLayers(screenCoordinate: ScreenCoordinate, tolerance: Double, returnPopupsOnly: Boolean): Result<List<IdentifyLayerResult>>

Initiate an Identify operation on all layers in the view.

Results are returned in top-to-bottom order.

The tolerance parameter determines the extent of the region used during the identify operation. This overload will return the single visible topmost GeoElement per layer or sublayer only. A tolerance of 0 tests just the physical pixel at screenCoordinate. Tolerance values above 0 are in DIPs and specify a circular region centered on screenCoordinate, with radius equal to tolerance. The maximum allowed tolerance value is 100 DIPs, resulting in an identify circle of diameter 200 DIPs. The returnPopupsOnly parameter controls what properties are populated in the IdentifyLayerResult instances that are returned by the identify operation:

  • true: each IdentifyLayerResult.popups property will be populated with results. Layers without popups will be omitted.

  • false: GeoElements will be populated. Layers with popups will also return popups.

Return

A Result containing a List of IdentifyLayerResult, containing one entry for each layer in the view that supports identify, or failure. Each entry contains a Layer and a List of elements of the type contained by the layer (e.g. com.arcgismaps.data.Feature for an com.arcgismaps.mapping.layers.FeatureLayer)

Since

200.0.0

Parameters

screenCoordinate

location on 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 results are populated


suspend fun identifyLayers(screenCoordinate: ScreenCoordinate, tolerance: Double, returnPopupsOnly: Boolean, maximumResults: Int): Result<List<IdentifyLayerResult>>

Initiate an Identify operation on all layers in the view.

Results are returned in top-to-bottom order.

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 DIPs and specify a circular region centered on screenCoordinate, with radius equal to tolerance. The maximum allowed tolerance value is 100 DIPs, resulting in an identify circle of diameter 200 DIPs. The returnPopupsOnly parameter controls what properties are populated in the IdentifyLayerResult instances that are returned by the identify operation:

  • true: each IdentifyLayerResult.popups property will be populated with results. Layers without popups will be omitted.

  • false: GeoElements will be populated. Layers with popups will also return popups.

Return

A Result containing a List of IdentifyLayerResult, containing one entry for each layer in the view that supports identify, or failure. Each entry contains a Layer and a List of elements of the type contained by the layer (e.g. com.arcgismaps.data.Feature for an com.arcgismaps.mapping.layers.FeatureLayer)

Since

200.0.0

Parameters

screenCoordinate

location on 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 results are populated

maximumResults

maximum number of GeoElements to return per layer or sublayer. -1 indicates unlimited results