ArcGIS Runtime SDK for WPF - Library Reference
DistanceTaskAsync(Geometry,Geometry,DistanceParameters,CancellationToken) Method
See Also 
ESRI.ArcGIS.Client.Tasks Namespace > GeometryService Class > DistanceTaskAsync Method : DistanceTaskAsync(Geometry,Geometry,DistanceParameters,CancellationToken) Method

geometry1
The geometry from where the distance is to be measured.
geometry2
The geometry to which the distance is to be measured. The structure of geometry is same as the structure of the JSON geometry objects returned by the ArcGIS REST API. The use of simple syntax is not supported.
parameters
Parameters contains additional properties that defines how the distance task will be preformed.
cancellationToken
The cancellation token.
Calculates the distance between two geometries.

Syntax

Visual Basic (Declaration) 
Public Overloads Function DistanceTaskAsync( _
   ByVal geometry1 As Geometry, _
   ByVal geometry2 As Geometry, _
   ByVal parameters As DistanceParameters, _
   ByVal cancellationToken As CancellationToken _
) As Task(Of DistanceResult)

Parameters

geometry1
The geometry from where the distance is to be measured.
geometry2
The geometry to which the distance is to be measured. The structure of geometry is same as the structure of the JSON geometry objects returned by the ArcGIS REST API. The use of simple syntax is not supported.
parameters
Parameters contains additional properties that defines how the distance task will be preformed.
cancellationToken
The cancellation token.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.