Show / Hide Table of Contents

Method IdentifyLayerAsync

IdentifyLayerAsync(Layer, Point, Double, Boolean)

Initiates an identify operation on the specified layer which will return the single visible topmost geolement only.

Declaration
public Task<IdentifyLayerResult> IdentifyLayerAsync(Layer layer, Point screenPoint, double tolerance, bool returnPopupsOnly)
Parameters
Type Name Description
Layer layer

The layer in which to identify the geoelements.

System.Windows.Point screenPoint

The screen coordinates to identify the geoelements.

System.Double tolerance

A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.

System.Boolean returnPopupsOnly

true includes only popups in the identify results. An error is returned if the layer does not have popups. false includes both geoelements and popups in the identify results.

Returns
Type Description
System.Threading.Tasks.Task<IdentifyLayerResult>

A task that represents the asynchronous identify operation on the specified layer. The value of the TResult parameter contains IdentifyLayerResult

Remarks

As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only Popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both GeoElements and Popups are populated, if the layer has popups.

Applies to

Platforms and versions
TargetVersions
.NET Windows100.13 - 200.8
.NET Framework100.0 - 200.8

IdentifyLayerAsync(Layer, Point, Double, Boolean, CancellationToken)

Initiates an identify operation on the specified layer which will return the single visible topmost GeoElement only.

Declaration
public Task<IdentifyLayerResult> IdentifyLayerAsync(Layer layer, Point screenPoint, double tolerance, bool returnPopupsOnly, CancellationToken cancellationToken)
Parameters
Type Name Description
Layer layer

The layer on which to run the identify.

System.Windows.Point screenPoint

The location at which to run identify in screen coordinates.

System.Double tolerance

The width and height in screen coordinates of the square centered on screen coordinate that will be used in the identify.

System.Boolean returnPopupsOnly

true includes only popups in the identify results. An error is returned if the layer does not have popups. false includes both geoelements and popups in the identify results.

System.Threading.CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
System.Threading.Tasks.Task<IdentifyLayerResult>

A task that represents the asynchronous identify operation on the specified layer. The value of the TResult parameter contains IdentifyLayerResult

Remarks

As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only Popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both GeoElements and Popups are populated, if the layer has popups.

Applies to

Platforms and versions
TargetVersions
.NET Windows100.13 - 200.8
.NET Framework100.0 - 200.8

IdentifyLayerAsync(Layer, Point, Double, Boolean, Int64)

Identifies a limited number of geoelements in the specified layer or sublayer, at the given screen point.

Declaration
public Task<IdentifyLayerResult> IdentifyLayerAsync(Layer layer, Point screenPoint, double tolerance, bool returnPopupsOnly, long maximumResults)
Parameters
Type Name Description
Layer layer

The layer in which to identify the geoelements.

System.Windows.Point screenPoint

The screen coordinates to identify the geoelements.

System.Double tolerance

A radius in device-independent pixels (DIP) that specifies how precise the identify operation should be.

System.Boolean returnPopupsOnly

true includes only popups in the identify results. An error is returned if the layer does not have popups. false includes both geoelements and popups in the identify results.

System.Int64 maximumResults

The maximum number of geoelements and/or popups returned in the IdentifyLayerResult. A value of -1 indicates unlimited results.

Returns
Type Description
System.Threading.Tasks.Task<IdentifyLayerResult>

A task that represents the asynchronous identify operation on the specified layer. The value of the TResult parameter contains IdentifyLayerResult

Remarks

As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only Popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both GeoElements and Popups are populated, if the layer has popups. GeoElements and Popups provide the results in a top-to-bottom order.

Applies to

Platforms and versions
TargetVersions
.NET Windows100.13 - 200.8
.NET Framework100.0 - 200.8

IdentifyLayerAsync(Layer, Point, Double, Boolean, Int64, CancellationToken)

Initiates an identify operation on the specified layer.

Declaration
public Task<IdentifyLayerResult> IdentifyLayerAsync(Layer layer, Point screenPoint, double tolerance, bool returnPopupsOnly, long maximumResults, CancellationToken cancellationToken)
Parameters
Type Name Description
Layer layer

The layer on which to run the identify.

System.Windows.Point screenPoint

The location at which to run identify in screen coordinates.

System.Double tolerance

The width and height in screen coordinates of the square centered on screen coordinate that will be used in the identify.

System.Boolean returnPopupsOnly

true includes only popups in the identify results. An error is returned if the layer does not have popups. false includes both geoelements and popups in the identify results.

System.Int64 maximumResults

The maximum size of the result set of GeoElements.

System.Threading.CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
System.Threading.Tasks.Task<IdentifyLayerResult>

A task that represents the asynchronous identify operation on the specified layer. The value of the TResult parameter contains IdentifyLayerResult

Remarks

As locations from user gestures are not always accurate to the exact pixel, you can define a tolerance for the identify operation. The tolerance parameter sets the radius of a circle, centered at the specified coordinates, in device-independent pixels (DIP). If the tolerance value is 0, identify performs the test at the specified coordinates. If it is greater than 0, identify tests inside the circle. For touch displays a value of 22 is recommended to cover an average finger tap. The maximum allowed value is 100 DIPs.

The result is returned in a single IdentifyLayerResult instance. If the returnPopupsOnly parameter is true only Popups is populated. If the layer does not have popups an error is returned. If the returnPopupsOnly parameter is false, both GeoElements and Popups are populated, if the layer has popups. GeoElements and Popups provide the results in a top-to-bottom order.

Applies to

Platforms and versions
TargetVersions
.NET Windows100.13 - 200.8
.NET Framework100.0 - 200.8
In This Article
Back to top Copyright © 2022 Esri.