start

fun start(initialGeometry: Geometry)

Starts a geometry editing session based on the specified geometry. Use this method for data editing workflows, where you have an existing com.arcgismaps.geometry.Geometry to be updated. After calling this method, the geometry is drawn in the map view, and interactions with the map view will select and edit the geometry, depending on the current GeometryEditor.tool and its InteractionConfiguration.

When the com.arcgismaps.geometry.SpatialReference of the initial geometry differs from that of the map view, the display will project the geometry to the com.arcgismaps.geometry.SpatialReference of the map view, using the default com.arcgismaps.geometry.DatumTransformation, for display and user interactions. Editing feature data that is reprojected on the fly can introduce spatial errors into data. When accuracy is important, best practice is to use a spatial reference for the map view which matches the feature layer geometry you are editing. The ArcGIS Pro editing help topic Introduction to projection on the * fly contains further advice.

Since

200.1.0

Parameters

initialGeometry

The initial GeometryEditor.geometry to start the editing session with.

Throws

if the geometry type of the given geometry is not one of: Multipoint, Point, Polygon, Polyline


fun start(geometryType: GeometryType)

Starts a geometry editing session with an empty geometry of the specified com.arcgismaps.geometry.GeometryType. Use this method for data creation workflows, where you know the com.arcgismaps.geometry.GeometryType required but do not have an existing geometry to edit. After calling this method, nothing is drawn on the map view initially - user interactions on the map view will define and edit the geometry, depending on the current GeometryEditor.tool.

GeometryEditor can be used to create com.arcgismaps.geometry.Point, com.arcgismaps.geometry.Multipoint, com.arcgismaps.geometry.Polygon, and com.arcgismaps.geometry.Polyline geometries - however FreehandTool, and ShapeTool are suitable for creating com.arcgismaps.geometry.Polygon, and com.arcgismaps.geometry.Polyline geometries only.

The new geometry will have the com.arcgismaps.geometry.SpatialReference of the map view. You can use com.arcgismaps.geometry.GeometryEngine.projectOrNull or com.arcgismaps.geometry.GeometryEngine.projectOrNull to project the final result GeometryEditor.geometry to a different spatial reference if required, for example when editing feature geometry. When accuracy is important, best practice is to use a spatial reference for the map view which matches the feature layer geometry you are creating. The ArcGIS Pro editing help topic Introduction to projection on the * fly contains further advice.

Since

200.1.0

Parameters

geometryType

The com.arcgismaps.geometry.GeometryType of geometry to edit.

Throws

if the given geometry type is not one of: Multipoint, Point, Polygon, Polyline