Show / Hide Table of Contents

Method IdentifyGraphicsOverlayAsync

IdentifyGraphicsOverlayAsync(GraphicsOverlay, Point, Double, Boolean)

Identifies the topmost graphic in the specified graphics overlay, at the given screen point.

Declaration
public async Task<IdentifyGraphicsOverlayResult> IdentifyGraphicsOverlayAsync(GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, bool returnPopupsOnly)
Parameters
Type Name Description
GraphicsOverlay graphicsOverlay

The graphics overlay in which to identify the graphic.

System.Windows.Point screenPoint

The screen coordinates to identify the graphic.

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<IdentifyGraphicsOverlayResult>

A task that represents the asynchronous identify operation on the specified graphics overlay. The value of the TResult parameter contains a read-only collection of Graphic

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 returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If returnPopupsOnly is true, Popups is populated. If the overlay does not have popups an error is returned. If returnPopupsOnly is false, Graphics and Popups are populated, if the overlay has popups.

Exceptions
Type Condition
System.ArgumentNullException

graphicsOverlay

Applies to

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

IdentifyGraphicsOverlayAsync(GraphicsOverlay, Point, Double, Boolean, Int64)

Identifies a limited number of graphics in the specified graphics overlay, at the given screen point.

Declaration
public async Task<IdentifyGraphicsOverlayResult> IdentifyGraphicsOverlayAsync(GraphicsOverlay graphicsOverlay, Point screenPoint, double tolerance, bool returnPopupsOnly, long maximumResults)
Parameters
Type Name Description
GraphicsOverlay graphicsOverlay

The graphics overlay in which to identify the graphics.

System.Windows.Point screenPoint

The screen coordinates to identify the graphics.

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 graphics and/or popups returned in the IdentifyGraphicsOverlayResult. A value of -1 indicates unlimited results.

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

A task that represents the asynchronous identify operation on the specified graphics overlay. The value of the TResult parameter contains a read-only collection of Graphic

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 returnPopupsOnly parameter controls which properties are populated in the IdentifyGraphicsOverlayResult instance. If true, only Popups is populated. If the overlay does not have popups an error is returned. If false, both Graphics and Popups are populated, if the overlay has popups.

Exceptions
Type Condition
System.ArgumentNullException

graphicsOverlay

Applies to

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