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.InsertPoint(MapRuler, CoordPoint, Int32) Method

Inserts a new point in the ruler.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public void InsertPoint(
    MapRuler ruler,
    CoordPoint point,
    int index
)

#Parameters

Name Type Description
ruler MapRuler

The ruler to which to add a point.

point CoordPoint

A new ruler point.

index Int32

A new ruler point index.

#Remarks

If a ruler already contains a point with the specified index, this existing point and all subsequent points increase in increments of one (1). A new point is added with the specified index.

The following code adds a point with Berlin’s coordinates to the previously created ruler:

//Create a ruler
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
// Add a point                                                            
mapControl1.Measurements.InsertPoint(ruler, new GeoPoint(52.520008, 13.404954), 2); // Berlin

Add Point to Map Ruler

See Also