Shape Tool
Allows you to create polygon or polyline geometries with a geometric shape by using a single drag interaction. Create a new shape tool using ShapeTool.create and specify the type of shape to be created
the ShapeTool.shapeType cannot be changed after the tool is instantiated. Call GeometryEditor.start, passing in either com.arcgismaps.geometry.GeometryType.Polyline or com.arcgismaps.geometry.GeometryType.Polygon, then drag on the com.arcgismaps.mapping.view.MapView to define the location and size of the shape. For example, drag diagonally to define the corners of a bounding box within which a ShapeToolType.Rectangle or ShapeToolType.Arrow shape fits, or to define the center point and a point on the circumference of a ShapeToolType.Ellipse or point of a ShapeToolType.Triangle.
You can select different GeometryEditorElement objects by tapping, move selected elements, and use transformation control handles to rotate and scale the selected elements, subject to the current ShapeTool.configuration.
You can also use this tool to add new geometric shaped parts to existing polygon or polyline geometries by setting InteractionConfiguration.allowPartCreation to true in the ShapeTool.configuration and calling GeometryEditor.start. You cannot use ShapeTool to create geometry types other than com.arcgismaps.geometry.GeometryType.Polygon or com.arcgismaps.geometry.GeometryType.Polyline.
By default, this tool does not display vertices or mid-vertices because you do not interact with individual vertices using this tool. The appearance can be customized by changing ShapeTool.style. By default, this tool enables creation, selection, transformation, and deletion. This behavior can be customized with ShapeTool.configuration.
Since
200.2.0
See also
Constructors
Create a ShapeTool to draw the specified ShapeToolType.
Properties
Defines the set of interactive operations enabled when using this tool. By default, this tool has an InteractionConfiguration.allowPartCreation value of false in the ShapeTool.configuration, which allows only the initial part of the specified shape to be added interactively - subsequent interactions may navigate the map view instead of changing the geometry. To add additional parts to the geometry with each new drag interaction, each with the specified ShapeToolType, set InteractionConfiguration.allowPartCreation to true.
The type of geometric shape drawn by this tool, set at instantiation using ShapeTool.create.
Inherited properties
Defines the visual appearance of GeometryEditor geometries when this tool is in use. When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its GeometryEditorTool.style property. For example, FreehandTool and ShapeTool define all vertex symbols as null by default because they use drag gestures to define entire parts of polyline and polygon geometries, whereas the VertexTool defines non-null vertex symbols because it is important to be able to see and interact with individual vertices when editing geometries with this tool.