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 | Map |
The ruler to which to add a point. |
point | Coord |
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