Skip to main content
A newer version of this page is available. .
All docs
V20.2

Measurements.RemovePoint(MapRuler, Int32) Method

Removes a point with the specified index.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.2.dll

NuGet Package: DevExpress.Win.Map

Declaration

public void RemovePoint(
    MapRuler ruler,
    int index
)

Parameters

Name Type Description
ruler MapRuler

A ruler from which to remove a point.

index Int32

A ruler point index.

Remarks

The example below creates a ruler to measure the distance between Paris, Milan and Vienna. After calculating this distance, the code updates the ruler as follows:

  • a point is added at Berlin’s coordinates;
  • the first point is moved from Paris to Dusseldorf;
  • the point at Milan’s coordinates is removed from 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
                                                        });
//The code below updates the ruler.                                                        
mapControl1.Measurements.InsertPoint(ruler, new GeoPoint(52.520008, 13.404954), 2); // Berlin
mapControl1.Measurements.UpdatePoint(ruler, new GeoPoint(51.2217200, 6.7761600), 0); // Dusseldorf
mapControl1.Measurements.RemovePoint(ruler, 1); // Milan
Before Update After Update
Before update ruler points  After update ruler points
See Also