Class GeometryEditor
Allows you to create new geometries, and change existing geometries, by interacting with a Map
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.UI.Editing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class GeometryEditor : INotifyPropertyChanged
Remarks
To use a Geometry
- Set the Geometry
Editor property. - Call one of the start methods.
- You can then edit the geometry directly on the map view using mouse or touch gestures.
- Call Stop() to return the geometry and prevent the geometry editor from processing any more interactions.
When started (Istrue
), you can interact with the different
Geometry
The type of the current Tool determines how you create and edit geometries, with the current
Interaction
-
The default Vertex
Tool allows you to create and edit geometries by interacting with individual vertices. You can tap to select the different elements and drag to move them, and also tap multiple times on an element to select the different types of GeometryEditor representing vertices, parts, or the entire geometry. You can rotate and scale the selected element (if applicable to the selected element type), and can also create new parts in a multipart geometry (if enabled in the InteractionElement Configuration ). -
The Freehand
Tool is ideal for creating new polygon or polyline geometries using a single freehand drag gesture. It also allows multiple taps to cycle the selected element type. -
The Shape
Tool is ideal for creating new polygon or polyline geometries with a geometric shape by using a single drag interaction. It also allows multiple taps to cycle the selected element type. -
The Reticle
Vertex is recommended for precise, vertex-based, geometry editing on touch devices, especially when using snapping (SnapTool Settings ). It does not support multiple taps to cycle the selected element.
Programmatic changes to the Geometry or Selected
Change the appearance of the geometry by using the Geometry
Enabling snapping can help ensure that interactive edits are more accurate, with fewer errors, by allowing you
to create geometries that connect to each other and are coincident. Use Snap
Programmatic editing methods are also provided so you can augment your interactive geometry editing to support specific user requirements. For example:
- Use Insert
Vertex(Map to add a subsequent vertex based on a GPS location from LocationPoint) Display . - Use Delete
Selected to delete the current SelectedElement() Element . - Use Move
Selected to move the currently selected GeometryElement(Map Point) Editor to a specific System.Element Drawing. , or MovePoint Selected to nudge it in a specific direction.Element(Double, Double) - Use Replace
Geometry(Geometry) to take the current Geometry, apply an operation such as a union or intersect by using GeometryEngine , and then replace the current geometry with the result so you can continue to edit as required. - Use Undo() and Redo() to undo and redo individual interactive or programmatic edits.
Use
Constructors
Name | Description |
---|---|
Geometry |
Initializes a new instance of the Geometry |
Properties
Name | Description |
---|---|
Can |
Gets a value indicating whether there are actions that can be redone on the Geometry. |
Can |
Gets a value indicating whether there are actions that can be undone on the Geometry. |
Geometry | Gets the current geometry, updated as you interact with the view. |
Is |
Gets a value indicating whether an editing session is active. |
Is |
Gets or sets a value indicating whether the geometry is visible in the view. |
Selected |
Gets the element that is currently selected in the Geometry |
Snap |
Gets or sets the configurable options for interactive snapping. |
Tool | Gets or sets the tool defining how you interact with the view to create and edit the Geometry. |
Methods
Name | Description |
---|---|
Clear |
Clears the current geometry being edited. |
Clear |
Clears the current selection. |
Delete |
Deletes the selected element from the current Geometry. |
Insert |
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. |
Move |
Moves the selected element to the specified location. |
Move |
Moves the selected element by the specified deltas. |
On |
Raises the Property |
Redo() | Redoes the last action undone on the Geometry. |
Replace |
Replaces the current Geometry with the specified geometry. |
Rotate |
Rotates the Selected |
Scale |
Scales the selected element by the specified factors. |
Select |
Selects the entire Geometry. |
Select |
Selects the mid-vertex with the specified indices. |
Select |
Selects the part with the specified index. |
Select |
Selects the vertex with the specified indices. |
Start(Geometry) | Starts a geometry editing session based on the specified geometry. |
Start(Geometry |
Starts a geometry editing session with an empty geometry of the specified Geometry |
Stop() | Stops the editing session by making the Geometry |
Undo() | Undoes the last action on the Geometry. |
Events
Name | Description |
---|---|
Property |
Occurs when a non-dependency property value changes. |
Snap |
Indicates that the snap candidate used by the Geometry |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 200.3 - 200.6 |
.NET | 200.3 - 200.6 |
.NET Windows | 200.3 - 200.6 |
.NET Android | 200.3 - 200.6 |
.NET iOS | 200.3 - 200.6 |
.NET Framework | 200.3 - 200.6 |
UWP | 200.3 - 200.6 |