Allows you to create polygon or polyline geometries with a geometric shape by using a single drag interaction. More...
Import Statement: | import Esri.ArcGISRuntime |
Since: | Esri.ArcGISRuntime 200.2 |
Inherits: |
- List of all members, including inherited members
- ShapeTool is part of QML Type List.
Properties
- configuration : InteractionConfiguration
- shapeType : Enums.ShapeToolType
Signals
Methods
- ShapeTool create(Enums.ShapeToolType shapeType)
Detailed Description
Create a new shape tool using create and specify the type of shape to be created - the shapeType cannot be changed after the tool is instantiated. Call the start methond on GeometryEditor, passing in either GeometryTypePolyline or GeometryTypePolygon, then drag on the 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 ShapeToolTypeRectangle or ShapeToolTypeArrow shape fits, or to define the center point and a point on the circumference of an ShapeToolTypeEllipse or point of a ShapeToolTypeTriangle.
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 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 configuration and calling GeometryEditor::startWithGeometry. You cannot use ShapeTool to create geometry types other than GeometryTypePolygon or GeometryTypePolyline.
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 style. By default, this tool enables creation, selection, transformation, and deletion. This behavior can be customized with configuration.
Note: You cannot declare or create a component of this type in QML code.
See also VertexTool, FreehandTool, and GeometryEditor::tool.
Property Documentation
configuration : InteractionConfiguration |
Defines the set of interactive operations enabled when using this tool.
By default, this tool has an InteractionConfiguration::allowPartCreation value of false
in the 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 Enums.ShapeToolType, set InteractionConfiguration::allowPartCreation to true
.
[read-only] shapeType : Enums.ShapeToolType |
The type of geometric shape drawn by this tool, set at instantiation using create (read-only).
Signal Documentation
configurationChanged() |
Emitted when the configuration property changes.
Note: The corresponding handler is onConfigurationChanged
.
Method Documentation
ShapeTool create(Enums.ShapeToolType shapeType) |
Create a ShapeTool to draw the specified Enums.ShapeToolType.
- shapeType - The type of shape drawn by this tool.
By default, this tool enables the creation, selection, transformation, and deletion interactions appropriate for creating geometries with a geometric shape. This behavior can be customized with configuration.
This method can only be accessed via the Factory object.
Factory.ShapeTool.create(Enums.ShapeToolTypeArrow);
See also shapeType.