GeoUtils.CalculateDistance(GeoPoint, GeoPoint) Method
Calculates the distance between specified points.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.2.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
Parameters
Name | Type | Description |
---|---|---|
p1 | GeoPoint | The first geographical point. |
p2 | GeoPoint | The second geographical point. |
Returns
Type | Description |
---|---|
Double | The distance in meters. |
Remarks
This CalculateDistance
overload considers the Earth to be a reference ellipsoid (WGS 84) and calculates distance along an ellipsoidal surface.
The following example shows how to use the CalculateDistance
method to compute the distance between two points:
double distance = GeoUtils.CalculateDistance(new GeoPoint(36.1, -115.1), new GeoPoint(34, -118.2));
See Also