Measurements.InsertPoint(MapRuler, CoordPoint, Int32) Method
In This Article
Inserts a new point in the ruler.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
NuGet Package: DevExpress.Win.Map
#Declaration
public void InsertPoint(
MapRuler ruler,
CoordPoint point,
int index
)
#Parameters
Name | Type | Description |
---|---|---|
ruler | Map |
A 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 coordinates to the 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
mapControl1.Measurements.InsertPoint(ruler, new GeoPoint(52.520008, 13.404954), 2); // Berlin
See Also