Skip to main content
All docs

Measurements.DistanceUnits Property

Gets or sets measurement units for distance rulers.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v23.1.dll

NuGet Package: DevExpress.Wpf.Map


public MeasureUnit DistanceUnits { get; set; }

Property Value

Type Description

Distance measurement units.


You can use the following values:

To apply the measurement unit to the ruler, specify the unit before you create the ruler. The following code creates a ruler that measures the distance in miles:

mapControl1.Measurements.DistanceUnits = MeasureUnit.Mile;
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Distance, new List<CoordPoint>() {
                                                                                  new GeoPoint(0, 0),
                                                                                  new GeoPoint(10, 0),
                                                                                  new GeoPoint(10, 10)});
See Also