ReticleInteractionConfiguration class final
Defines the set of interactive operations you can enable or disable for a ReticleVertexTool.
A ReticleInteractionConfiguration allows you to customize the interactive geometry editing experience when editing with a reticle to suit your specific users and app workflow. The default values of ReticleVertexTool.configuration allow creating and moving vertices.
Editing geometries when using the ReticleVertexTool involves different interactions to the VertexTool:
-
When you start a geometry editor with an empty geometry (GeometryEditor.startWithGeometryType) and the reticle is displayed, it will show the GeometryEditorStyle.feedbackVertexSymbol at the crosshairs of the reticle. Tapping on the map view (at any position) will add a vertex at the position indicated by this symbol.
-
When you drag on the map view to pan the map, the reticle remains in the center of the view, which repositions the reticle over the map. The feedback symbols (GeometryEditorStyle.feedbackVertexSymbol and GeometryEditorStyle.feedbackLineSymbol) update to show what change will be made to the GeometryEditor.geometry when you next tap on the map view. The new vertex is added at the index position (GeometryEditorVertex.vertexIndex) following the currently selected element (GeometryEditor.selectedElement).
-
New vertices can also be created in between two existing vertices by using a mid-vertex (GeometryEditorStyle.midVertexSymbol). Position the reticle over the mid-vertex and tap, then drag the map and tap a second time to drop the new vertex in the required position.
-
To move an existing vertex, first pan the map to position the reticle crosshairs over an existing vertex, and then tap. This will start a move of that vertex. Drag the map to reposition the reticle - you will again see the feedback symbols which indicate the change that will be made to the GeometryEditor.geometry. When the vertex is positioned correctly at the required new position, tap a second time to finish the move and update the geometry with the new vertex position.
If using snapping (see SnapSettings), the position of the GeometryEditorStyle.feedbackVertexSymbol will be adjusted to account for the current snapping configuration when adding and moving vertices with the ReticleVertexTool.
Use the properties on this class to customize which interactions are enabled. For example:
- Disable vertex creation (ReticleInteractionConfiguration.allowVertexCreation) to provide a tool focused on moving existing vertices in a geometry.
- Disable moving the selected element (ReticleInteractionConfiguration.allowMovingSelectedElement) for a workflow focused only on adding vertices, disallowing vertices to be moved with the tool.
- Set ReticleInteractionConfiguration.allowPartCreation to true to allow you to tap on the view when there is no current selection (GeometryEditor.selectedElement is null) to start new parts in polyline and polygon geometries.
You can change the interaction properties of a tool at any point, including when a geometry editor is started (GeometryEditor.isStarted = true) and the tool is in use by the editor. If you change a property that disallows an in-progress interaction, then the interaction is cancelled and does not affect the state of the GeometryEditor.
Tapping when the reticle crosshairs are positioned over an existing vertex or mid-vertex will also select that element in addition to starting a move (providing the current values of ReticleInteractionConfiguration allow). Both selection and also moving (ReticleInteractionConfiguration.allowMidVertexSelection, ReticleInteractionConfiguration.allowVertexSelection, and ReticleInteractionConfiguration.allowMovingSelectedElement) must be enabled in order to allow moving.
You cannot use the ReticleVertexTool to select whole geometries or parts of multipart geometries, or deselect vertices - switch to an appropriately configured VertexTool in order to allow this workflow if required. Alternatively, you can programmatically set and clear selections regardless of the tool type or its current interaction configuration - see GeometryEditor.clearSelection, GeometryEditor.selectGeometry, GeometryEditor.selectMidVertex, GeometryEditor.selectPart, and GeometryEditor.selectVertex.
- Implemented types
Constructors
- ReticleInteractionConfiguration()
-
Creates a ReticleInteractionConfiguration that enables vertex adding,
moving, and deleting.
factory
Properties
- allowDeletingSelectedElement ↔ bool
-
True if the selected GeometryEditorElement can be interactively deleted,
false otherwise. Default is true.
getter/setter pair
- allowMidVertexSelection ↔ bool
-
True if a mid-vertex of a polygon or polyline can be interactively
selected, false otherwise. Default is true.
getter/setter pair
- allowMovingSelectedElement ↔ bool
-
True if the selected GeometryEditorElement can be interactively moved,
false otherwise. Default is true.
getter/setter pair
- allowPartCreation ↔ bool
-
True if you can interactively create a new part in a polyline or polygon,
false otherwise. Default is false.
getter/setter pair
- allowVertexCreation ↔ bool
-
True to allow a vertex to be created interactively, false otherwise.
Default is true.
getter/setter pair
- allowVertexSelection ↔ bool
-
True to allow vertices to be selected interactively, false otherwise.
Default is true.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited