Skip to main content
All docs
V24.2

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

MapRuler.Measurement Property

Returns an area or distance value in the specified units.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public double Measurement { get; }

#Property Value

Type Description
Double

An area or distance value in the specified units.

#Remarks

The following code returns the distance in miles:

mapControl1.Measurements.DistanceUnits = MeasureUnit.Mile;
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Distance, 
                                                       new List<CoordPoint>() {
                                                           new GeoPoint(48.864716, 2.349014), // Paris
                                                           new GeoPoint(45.46427, 9.18951),   // Milan
                                                           new GeoPoint(48.20849, 16.37208)   // Vienna
                                                       });
double distance = ruler.Measurement;
See Also