Back to Devexpress

GeoUtils.CalculateLength(IList<GeoPoint>) Method

wpf-devexpress-dot-xpf-dot-map-dot-geoutils-dot-calculatelength-x28-system-dot-collections-dot-generic-dot-ilist-devexpress-dot-xpf-dot-map-dot-geopoint-x29.md

latest1.9 KB
Original Source

GeoUtils.CalculateLength(IList<GeoPoint>) Method

Calculates a polyline length in meters.

Namespace : DevExpress.Xpf.Map

Assembly : DevExpress.Xpf.Map.v25.2.dll

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public static double CalculateLength(
    IList<GeoPoint> points
)
vb
Public Shared Function CalculateLength(
    points As IList(Of GeoPoint)
) As Double

Parameters

NameTypeDescription
pointsIList<GeoPoint>

A collection of points that define the polyline vertices.

|

Returns

TypeDescription
Double

The polyline length in meters.

|

Remarks

The following code computes a length of a polyline given by three geographical points.

csharp
double lineLength = GeoUtils.CalculateLength(new List<GeoPoint> {
    new GeoPoint(35.286, -111.1724),
    new GeoPoint(38.3802, -110.9307),
    new GeoPoint(36.9365, -102.493)
});
vb
Dim lineLength As Double = GeoUtils.CalculateLength(New List(Of GeoPoint) From {
    New GeoPoint(35.286, -111.1724),
    New GeoPoint(38.3802, -110.9307),
    New GeoPoint(36.9365, -102.493)
})

See Also

GeoUtils Class

GeoUtils Members

DevExpress.Xpf.Map Namespace