Skip to main content
All docs
V25.2
  • 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.v25.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