startWithGeometryType method
- GeometryType geometryType
Starts a geometry editing session with an empty geometry of the specified GeometryType.
Use this method for data creation workflows, where you know the 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 ArcGISPoint, Multipoint, Polygon, and Polyline geometries - however FreehandTool, and ShapeTool are suitable for creating Polygon, and Polyline geometries only.
The new geometry will have the SpatialReference of the map view. You can use GeometryEngine.project or GeometryEngine.project 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.
Parameters:
geometryType
— The GeometryType of geometry to edit.
Implementation
void startWithGeometryType(
GeometryType geometryType,
) {
_withThrowingErrorHandler((errorHandler) {
runtimecore.RT_GeometryEditor_startWithGeometryType(
_handle,
geometryType.coreValue,
errorHandler,
);
});
}