Method InsertVertex
InsertVertex(MapPoint)
Creates a new vertex at the specified location and inserts it after the currently selected element, or appends the point if there is nothing selected.
Declaration
public void InsertVertex(MapPoint point)
Parameters
| Type | Name | Description |
|---|---|---|
| MapPoint | point | The location of the new vertex. |
Remarks
If Geometry is empty (IsEmpty is true), the given point is added as the
initial vertex, and then selected. If nothing is selected (SelectedElement is null), the
point is appended to the end of the Geometry, and then selected. If SelectedElement
is the first vertex in a part of a Multipart, the given point is inserted before the currently selected
vertex, and then selected.
If point is z-aware (HasZ = true), this method will change the Geometry to be z-aware, if it is not already.
If Geometry is a non-empty Point, this method replaces the existing point with the given point and selects it.
If the SelectedElement is the StartPoint of a curve segment
(IsCurve is true), the new vertex will be inserted after the selected element and the
existing curve segment will be replaced by two line segments. Alternatively, if it is the first vertex in a
part of a Multipart, the new vertex is inserted before the currently selected vertex.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The GeometryEditor must be started in order to insert a vertex. |
| ArgumentException | Empty points cannot be used to insert vertices into the GeometryEditor geometry. |
See Also
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET Standard 2.0 | 200.3 - 200.8 |
| .NET | 200.3 - 300.0 |
| .NET Windows | 200.3 - 300.0 |
| .NET Android | 200.3 - 300.0 |
| .NET iOS | 200.3 - 300.0 |
| .NET Framework | 200.3 - 200.8 |
| UWP | 200.3 - 200.8 |