GeometryEditorTool Class

  • GeometryEditorTool
  • class Esri::ArcGISRuntime::GeometryEditorTool

    A base class for tools that determine how you interact with a view when editing geometries with a GeometryEditor. More...

    Header: #include <GeometryEditorTool.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Object
    Inherited By:

    Esri::ArcGISRuntime::FreehandTool, Esri::ArcGISRuntime::ReticleVertexTool, Esri::ArcGISRuntime::ShapeTool, and Esri::ArcGISRuntime::VertexTool

    Public Functions

    virtual ~GeometryEditorTool() override
    Esri::ArcGISRuntime::GeometryEditorToolType geometryEditorToolType() const
    void setStyle(Esri::ArcGISRuntime::GeometryEditorStyle *style)
    Esri::ArcGISRuntime::GeometryEditorStyle *style() const

    Signals

    void styleChanged()

    Detailed Description

    Different types of GeometryEditorTool provide different ways of interacting with the view to create and edit geometries with a GeometryEditor. They control how an interaction (for example a tap or a drag gesture on the map view) uses the interaction position to update the GeometryEditor::geometry, or to navigate the map view. VertexTool and FreehandTool are both types of tools that allow you to customize how the GeometryEditor reacts to each user interaction, allowing you to tailor the exact behavior appropriately for your users and workflow. GeometryEditorTool also determines the appearance of the GeometryEditor::geometry by specifying the GeometryEditorStyle used to draw the geometry in the view.

    You may wish to create multiple different tool objects in order to hold different settings, and set them into GeometryEditor::tool as appropriate for your workflow. For example, you could create multiple VertexTool objects with GeometryEditorStyle values corresponding the different symbols used by different feature layers.

    The different tools do not correspond to different geometry types - for example the VertexTool can be used to edit Point, Multipoint, Polyline and Polygon geometries. The type of geometry being edited using the tool is defined by the start method parameter (see GeometryEditor::start(Esri::ArcGISRuntime::GeometryType) and GeometryEditor::start(const Esri::ArcGISRuntime::Geometry&).

    When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to the style property.

    See also VertexTool, FreehandTool, ShapeTool, ReticleVertexTool, GeometryEditor::geometryChanged, and GeometryEditor::selectedElementChanged.

    Member Function Documentation

    [override virtual] GeometryEditorTool::~GeometryEditorTool()

    Destructor.

    Esri::ArcGISRuntime::GeometryEditorToolType GeometryEditorTool::geometryEditorToolType() const

    Returns the type of this GeometryEditorTool.

    void GeometryEditorTool::setStyle(Esri::ArcGISRuntime::GeometryEditorStyle *style)

    Sets the style to style.

    Connect to the styleChanged signal to be notified when the style object has changed. You can change properties of Esri::ArcGISRuntime::GeometryEditorTool::style - the styleChanged signal is not emitted in this case.

    See also style.

    Esri::ArcGISRuntime::GeometryEditorStyle *GeometryEditorTool::style() const

    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 style property. For example, FreehandTool and ShapeTool define all vertex symbols as nullptr 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.

    See also setStyle().

    [signal] void GeometryEditorTool::styleChanged()

    Emits this signal when style changes.

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