Skip to main content
All docs
V24.1

Measurements.CreateRuler(RulerType, IList<CoordPoint>) Method

Creates a ruler of the specified type to measure the distance or area between coordinate points passed as the second parameter.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

public MapRuler CreateRuler(
    RulerType rulerType,
    IList<CoordPoint> points
)

Parameters

Name Type Description
rulerType RulerType

The type of the created ruler.

points IList<CoordPoint>

Coordinate points between which the ruler measures the distance or area.

Returns

Type Description
MapRuler

The created ruler.

Remarks

The following code adds a distance ruler to the map:

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

See Also