InteractionConfiguration QML Type

VertexTool or FreehandTool."> InteractionConfiguration QML Type | ArcGISQtQml
  • Esri.ArcGISRuntime
  • InteractionConfiguration
  • Defines the set of interactive operations you can enable or disable for a VertexTool or FreehandTool. More...

    Import Statement: import Esri.ArcGISRuntime
    Since: Esri.ArcGISRuntime 200.1
    Inherits:

    Object

    Properties

    Signals

    Methods

    Detailed Description

    An InteractionConfiguration allows you to customize the interactive geometry editing experience to suit your specific users. For example:

    You can tap multiple times on any GeometryEditorElement to select the different types of GeometryEditorElement representing vertices, parts, and the entire geometry. For example if all elements are allowed to be selected:

    • tap twice on a vertex of a Multipoint to select first the vertex and then the entire multipoint geometry
    • tap three times on a vertex of a Polyline or Polygon to select first the vertex, then the part, and then the entire geometry
    • tap twice on an edge of a Polyline or Polygon to select first the part and then the entire geometry
    • tap twice on a fill of a Polygon to select first the part and then the entire geometry

    Depending on the values of allowMovingSelectedElement, allowRotatingSelectedElement, and allowScalingSelectedElement, visual handles are displayed to help the user move, rotate, or scale the selected element.

    You can change the interaction properties of a tool at any point, including when a geometry editor is started (GeometryEditor::started = 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.

    Convenience methods are available to quickly set all properties relative to a category of interaction - for example use setAllowSelection(bool) to change all selection interactions, and setAllowTransformation(bool) to change all properties that control geometry transformation.

    See also VertexTool::configuration, FreehandTool::configuration, setAllowSelection(bool), setAllowTransformation(bool), and setAllowDeletion(bool).

    Property Documentation

    allowDeletingSelectedElement : bool

    true if the selected GeometryEditorElement can be interactively deleted, false otherwise. Default is true.

    Whether true or false, an element can be deleted by GeometryEditor::deleteSelectedElement.

    If true, then the GeometryEditorElement::canDelete property of the GeometryEditor::selectedElement is also true. If you have implemented a customization to allow users to interactively delete the selected element, then you can use this property to check if that customization should be enabled.

    setAllowDeletion(bool) sets this property.


    allowGeometrySelection : bool

    true if the entire geometry can be interactively selected, false otherwise. Default is true.

    If true, you can tap multiple times on elements of the geometry to make the entire geometry selected.

    Whether true or false, the entire geometry can be selected by GeometryEditor::selectGeometry.

    setAllowSelection(bool) sets this property.

    See also GeometryEditor::selectedElement, GeometryEditor::selectedElementChanged, and GeometryEditorGeometry.


    allowMidVertexSelection : bool

    true if a mid-vertex of a polygon or polyline can be interactively selected, false otherwise. Default is true.

    By default, mid-vertices (GeometryEditorMidVertex) are displayed and can be helpful in interactive workflows to provide a visual cue that new vertices can be inserted between the existing vertices of polygons and polylines. They may be most helpful for users with less editing experience.

    If true, and allowVertexCreation is also true, then you can select and drag a mid-vertex to insert a vertex into the GeometryEditor::geometry and immediately move it to the required position.

    If false, and you also do not intend to programmatically select any mid-vertices (GeometryEditor::selectMidVertex(int, int)) then set GeometryEditorStyle::midVertexSymbol to null to prevent the display of unusable mid-vertices.

    Whether true or false, a mid-vertex can be selected by GeometryEditor::selectMidVertex(int, int).

    setAllowSelection(bool) sets this property.

    See also GeometryEditor::selectedElement and GeometryEditor::selectedElementChanged.


    allowMovingSelectedElement : bool

    true if the selected GeometryEditorElement can be interactively moved, false otherwise. Default is true.

    If true, you can use a drag gesture to move the selected GeometryEditorElement to the required location. Create a tool to allow moving only specific types of GeometryEditorElement by also allowing or disallowing the selection of different types of element (allowVertexSelection for example).

    If false, the behavior of a drag gesture depends on the current GeometryEditor::tool. A VertexTool will pan the map, whereas a FreehandTool will create a new part (depending on allowPartCreation).

    If true, and the selected element is a GeometryEditorPart or a GeometryEditorGeometry with a geometry type of Enums.GeometryTypePolyline or Enums.GeometryTypePolygon, then a bounding box is drawn using the GeometryEditorStyle::boundingBoxSymbol.

    setAllowTransformation(bool) sets this property.

    See also requireSelectionBeforeMove.


    allowPartCreation : bool

    true if you can interactively create a new part in a polyline or polygon, false otherwise. Default is true.

    If true and the Enums.GeometryType of the GeometryEditor::geometry is a polygon or polyline, you can you can add new parts to the Multipart geometry - the GeometryEditor::tool determines the interaction required to add the new part. If the Enums.GeometryType of the GeometryEditor::geometry is a point or multipoint, this property is ignored.

    Users less experienced with GIS data may not understand how visually separate parts of polygons and polylines form a single geometry. You may wish to prevent such users from inadvertently creating geometries with multiple parts in order to keep their workflows straightforward and understandable. Alternatively, your app may be editing data which does not support multipart geometries.

    setAllowCreation(bool) sets this property.

    See also GeometryEditor::replaceGeometry(Geometry) and allowVertexCreation.


    allowPartSelection : bool

    true to allow a part of a Multipart geometry (Polyline or Polygon) to be selected interactively, false otherwise. Default is true.

    If true, you can tap on the edge of a polygon or polyline GeometryEditorGeometry in order to the select the part.

    Whether true or false, a part can be selected by GeometryEditor::selectPart(int). Parts are also selected after creation using a FreehandTool.

    setAllowSelection(bool) sets this property.

    See also allowPartCreation and GeometryEditorPart.


    [since Esri.ArcGISRuntime 200.2] allowRotatingSelectedElement : bool

    true to allow you to interactively rotate the selected GeometryEditorElement, false otherwise. Default is true.

    This property applies when the GeometryEditor::selectedElement is:

    For example, this does not apply if the selected element is a GeometryEditorVertex because a zero-dimensional geometry cannot be rotated.

    When this property is true, and the GeometryEditor::selectedElement is rotatable, then a control handle is displayed (see GeometryEditorStyle::rotateHandleSymbol) that allows the selected element to be interactively rotated. The bounding box of the selected element is also displayed (GeometryEditorStyle::boundingBoxSymbol).

    Interactive rotation changes the position of the selected element according to the movement of the rotation handle using the center of the extent of the selected element as the center of rotation (origin). Use GeometryEditor::rotateSelectedElement(double, Point) to rotate the selected element around a given origin.

    setAllowTransformation(bool) sets this property.

    This property was introduced in Esri.ArcGISRuntime 200.2.

    See also GeometryEditorElement::canRotate and GeometryEditor::geometryChanged.


    [since Esri.ArcGISRuntime 200.2] allowScalingSelectedElement : bool

    true to allow you to interactively scale the selected GeometryEditorElement, false otherwise. Default is true.

    This property applies when the GeometryEditor::selectedElement is:

    For example, this does not apply if the selected element is a GeometryEditorVertex because a zero-dimensional geometry cannot be scaled.

    When this property is true, and the GeometryEditor::selectedElement is scalable, then control handles are displayed (see GeometryEditorStyle::boundingBoxHandleSymbol) that allow the selected element to be interactively scaled. The bounding box of the selected element is also displayed (GeometryEditorStyle::boundingBoxSymbol).

    Interactive scaling changes the extent of the selected element according to the movement of the scale handle being moved - the opposite handle is used as the origin of the scale transformation. Use GeometryEditor::scaleSelectedElement(double, double, Point) to scale the selected element relative to a given origin.

    setAllowTransformation(bool) sets this property.

    This property was introduced in Esri.ArcGISRuntime 200.2.

    See also GeometryEditorElement::canScale and GeometryEditor::geometryChanged.


    allowVertexCreation : bool

    true to allow a vertex to be created interactively, false otherwise. Default is true.

    If true, you can tap on the map to add a new vertex. The vertex is inserted after the previously selected vertex, or as the first vertex if the previous selection was the first vertex in a Polyline. If you tap on an existing GeometryEditorElement then selection occurs instead.

    A FreehandTool ignores this property as it does not create individual vertices; instead you use a freehand gesture to create a a part in a polygon or polyline geometry.

    Whether true or false, a vertex can be created by GeometryEditor::insertVertex(Point).

    setAllowCreation(bool) sets this property.

    See also GeometryEditor::geometryChanged and allowPartCreation.


    allowVertexSelection : bool

    true to allow vertices to be selected interactively, false otherwise. Default is true.

    If true, you can tap on a vertex to select it.

    To prevent vertices from being selected interactively by tapping on the vertex, while still allowing programmatic selection, set allowVertexSelection to false.

    Whether true or false, a vertex may still become selected in other ways, for example by a call to GeometryEditor::selectVertex(int, int), or when a new vertex is created.

    setAllowSelection(bool) sets this property.

    See also GeometryEditor::selectedElement, GeometryEditor::selectedElementChanged, and GeometryEditorVertex.


    requireSelectionBeforeMove : bool

    true to require a GeometryEditorElement to first be selected before it can be moved by interactively dragging, false otherwise. Default is false.

    By default, you can select and immediately move an element in one gesture. Some users may find this can lead to an increase in accidental element moves when editing. By setting this to true, this can reduce the possibility of accidental moves. Alternatively, you may wish to provide access to GeometryEditor::undo and GeometryEditor::redo to provide easy correction of accidental edits.

    If false, the behavior of a drag gesture depends on the current GeometryEditor::tool. For a VertexTool, a drag gesture on the map over a geometry editor element that is not already selected pans the map, whereas a FreehandTool will create a new part (depending on allowPartCreation).

    This property applies if and only if allowMovingSelectedElement is true.


    [since Esri.ArcGISRuntime 200.2] scaleMode : Enums.GeometryEditorScaleMode

    Determines how a geometry can be interactively scaled (resized) to fill its allocated space while using the GeometryEditor.

    This property is ignored during geometry editing if allowScalingSelectedElement is false. It will be used to define how geometries are initially created by a drag interaction when the active tools is a ShapeTool regardless of the value of allowScalingSelectedElement.

    The scale control handles displayed to the user differ according to the value of this property.

    This property was introduced in Esri.ArcGISRuntime 200.2.

    See also allowScalingSelectedElement, GeometryEditorElement::canScale, and GeometryEditor::scaleSelectedElement(double, double, Point).


    Signal Documentation

    allowDeletingSelectedElementChanged()

    Emitted when the allowDeletingSelectedElement property changes.

    Note: The corresponding handler is onAllowDeletingSelectedElementChanged.


    allowGeometrySelectionChanged()

    Emitted when the allowGeometrySelection property changes.

    Note: The corresponding handler is onAllowGeometrySelectionChanged.


    allowMidVertexSelectionChanged()

    Emitted when the allowMidVertexSelection property changes.

    Note: The corresponding handler is onAllowMidVertexSelectionChanged.


    allowMovingSelectedElementChanged()

    Emitted when the allowMovingSelectedElement property changes.

    Note: The corresponding handler is onAllowMovingSelectedElementChanged.


    allowPartCreationChanged()

    Emitted when the allowPartCreation property changes.

    Note: The corresponding handler is onAllowPartCreationChanged.


    allowPartSelectionChanged()

    Emitted when the allowPartSelection property changes.

    Note: The corresponding handler is onAllowPartSelectionChanged.


    [since Esri.ArcGISRuntime 200.2] allowRotatingSelectedElementChanged()

    Emitted when the allowRotatingSelectedElement property changes.

    Note: The corresponding handler is onAllowRotatingSelectedElementChanged.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    [since Esri.ArcGISRuntime 200.2] allowScalingSelectedElementChanged()

    Emitted when the allowScalingSelectedElement property changes.

    Note: The corresponding handler is onAllowScalingSelectedElementChanged.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    allowVertexCreationChanged()

    Emitted when the allowVertexCreation property changes.

    Note: The corresponding handler is onAllowVertexCreationChanged.


    allowVertexSelectionChanged()

    Emitted when the allowVertexSelection property changes.

    Note: The corresponding handler is onAllowVertexSelectionChanged.


    requireSelectionBeforeMoveChanged()

    Emitted when the requireSelectionBeforeMove property changes.

    Note: The corresponding handler is onRequireSelectionBeforeMoveChanged.


    [since Esri.ArcGISRuntime 200.2] scaleModeChanged()

    Emitted when the scaleMode property changes.

    Note: The corresponding handler is onScaleModeChanged.

    This signal was introduced in Esri.ArcGISRuntime 200.2.


    Method Documentation

    void setAllowCreation(bool allowCreation)

    Enable or disable creation.

    • allowCreation - Indicates if creation is allowed.

    Sets the following properties:

    Deletion, selection and transformation properties are unaltered.


    void setAllowDeletion(bool allowDeletion)

    Enable or disable deletion.

    • allowDeletion - Indicates if deletion is allowed.

    Sets the following properties:

    - allowDeletingSelectedElement

    Creation, selection and transformation properties are unaltered.


    void setAllowSelection(bool allowSelection)

    Enable or disable selection.

    • allowSelection - Indicates if selection is allowed.

    Sets the following properties:

    - allowGeometrySelection - allowMidVertexSelection - allowPartSelection - allowVertexSelection

    Creation, deletion and transformation properties are unaltered.


    void setAllowTransformation(bool allowTransformation)

    Enable or disable interactions that transform the GeometryEditor::geometry, for example allowMovingSelectedElement.

    • allowTransformation - Indicates if transformation is allowed.

    Sets the following properties:

    - allowMovingSelectedElement

    Creation, deletion and selection properties are unaltered.


    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.