Show / Hide Table of Contents

Method IdentifyLayersAsync

| Edit this page View Source

IdentifyLayersAsync(Point, double, bool, CancellationToken)

Initiates an identify operation on all layers in the view which will return the single visible topmost geoelement per layer only.

Declaration
public virtual Task<IReadOnlyList<IdentifyLayerResult>> IdentifyLayersAsync(Point screenPoint, double tolerance, bool returnPopupsOnly = false, CancellationToken cancellationToken = default)
Parameters
Type Name Description
Point screenPoint

The location on which to run identify in screen coordinates.

double tolerance

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

bool returnPopupsOnly

true includes only popups in the identify results. false includes both geoelements and popups in the identify results.

CancellationToken cancellationToken

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

Returns
Type Description
Task<IReadOnlyList<IdentifyLayerResult>>

A task that represents the asynchronous identify operation on all layers in the view The value of the TResult parameter contains a read-only collection of IdentifyLayerResult in top to bottom order.

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 collection of IdentifyLayerResult to match the order of the GeoView's Map or Scene operationalLayers collection. If the returnPopupsOnly parameter is true only Popups is populated. If the returnPopupsOnly parameter is false, both GeoElements and Popups are populated, if the layer has popups.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX