geometryEditor property
Allows users to interactively create and edit geometries by interacting with the view.
After assigning a GeometryEditor to the ArcGISMapViewController, a Geometry being edited by the GeometryEditor will be displayed using the context, orientation and spatial reference of the ArcGISMapViewController.
It may be useful to transfer a GeometryEditor, with its partly edited Geometry, from one ArcGISMapViewController to another ArcGISMapViewController. For example, in a multi-view application, partway through editing, a user may want to see and continue editing the partially edited geometry in an ArcGISMapViewController using a different Basemap, rotation or SpatialReference (without changing the settings of their initial ArcGISMapViewController).
A GeometryEditor can only be connected to one ArcGISMapViewController at a time. If the same GeometryEditor is assigned to a second ArcGISMapViewController without first detaching, then the previous ArcGISMapViewController will automatically have its ArcGISMapViewController.geometryEditor property changed to null. The GeometryEditor will project the Geometry to the SpatialReference of the new ArcGISMapViewController.
Starting or stopping Geometry editing using the GeometryEditor is independent of the GeometryEditor being attached to an ArcGISMapViewController.
If editing the Geometry has already been started (using GeometryEditor.startWithGeometryType) then reassignment of the GeometryEditor will automatically:
- stop the editing, retain any changes, but undo can't be called on those changes
- start the editing with the changed Geometry projected to the new ArcGISMapViewController.
There is no difference between calling GeometryEditor.startWithGeometryType before or after the GeometryEditor is assigned to an ArcGISMapViewController. GeometryEditor.stop does not detach the GeometryEditor from its current ArcGISMapViewController.
If the SpatialReference of the ArcGISMapViewController is changed (for example, by a different ArcGISMap being connected to the ArcGISMapViewController) then the GeometryEditor will automatically take the same actions:
- stop the editing, retain any changes, but undo can't be called on those changes
- start the editing with the changed Geometry projected to the new ArcGISMapViewController.
Implementation
GeometryEditor? get geometryEditor => _geometryEditor.value;
Implementation
set geometryEditor(GeometryEditor? value) => _geometryEditor.value = value;