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

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

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

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.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),
                                                            new GeoPoint(45.46427, 9.18951),
                                                            new GeoPoint(48.20849, 16.37208) });

image

See Also