ESRI.ArcGIS.Mobile
GetNearestCoordinate Method
See Also  Send Feedback
ESRI.ArcGIS.Mobile.Geometries Namespace > CoordinateCollection Class : GetNearestCoordinate Method

targetCoordinate
The input coordinate to compare to.
queryNearestCoordinate
Returns the nearest coordinate.
segmentIndex
Returns the segment index on the part where the nearest coordinate was found.
squareDistanceFound
Return the squared distance.
Gets a coordinate that is closest to the input coordinate.

Syntax

Visual Basic (Declaration) 
Public Function GetNearestCoordinate( _
   ByVal targetCoordinate As Coordinate, _
   ByVal queryNearestCoordinate As Coordinate, _
   ByRef segmentIndex As Integer, _
   ByRef squareDistanceFound As Double _
) As Boolean
C# 
public bool GetNearestCoordinate( 
   Coordinate targetCoordinate,
   Coordinate queryNearestCoordinate,
   ref int segmentIndex,
   ref double squareDistanceFound
)

Parameters

targetCoordinate
The input coordinate to compare to.
queryNearestCoordinate
Returns the nearest coordinate.
segmentIndex
Returns the segment index on the part where the nearest coordinate was found.
squareDistanceFound
Return the squared distance.

Exceptions

ExceptionDescription
ArgumentNullExceptionNull coordinate.

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