ESRI.ArcGIS.Mobile
Distance Method
See Also  Send Feedback
ESRI.ArcGIS.Mobile.Geometries Namespace > Coordinate Class : Distance Method

other
The other coordinate used to calculate distance from this coordinate.
Calculates the distance between this coordinate and another one.

Syntax

Visual Basic (Declaration) 
Public Function Distance( _
   ByVal other As Coordinate _
) As Double
C# 
public double Distance( 
   Coordinate other
)

Parameters

other
The other coordinate used to calculate distance from this coordinate.

Return Value

A double containing the distance between the two coordinates.

Example

//Finds out the distance between the upper left corner of the map and its center.
Coordinate positionA, positionB;
positionA = map.GetEnvelope().GetCenter();
positionB = map.GetEnvelope().UpperLeft;
double dist = positionA.Distance(positionB);
// Converts integer distance to the value in real world units.
double ddist = map.SpatialReference.FromGeometry(dist);

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also