Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GeoUtils.CalculateLength(IList<GeoPoint>) Method

Calculates a polyline length in meters.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public static double CalculateLength(
    IList<GeoPoint> points
)

#Parameters

Name Type Description
points IList<GeoPoint>

A collection of points that define the polyline vertices.

#Returns

Type Description
Double

The polyline length in meters.

#Remarks

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

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)
});
See Also