GeometryEditorStyle Class

  • GeometryEditorStyle
  • class Esri::ArcGISRuntime::GeometryEditorStyle

    Defines the visual appearance of a geometry displayed by the GeometryEditor. More...

    Header: #include <GeometryEditorStyle.h>
    Since: Esri::ArcGISRuntime 200.1
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    GeometryEditorStyle(QObject *parent = nullptr)
    virtual ~GeometryEditorStyle() override
    Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol() const
    Esri::ArcGISRuntime::Symbol *boundingBoxSymbol() const
    Esri::ArcGISRuntime::Symbol *feedbackLineSymbol() const
    Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *fillSymbol() const
    Esri::ArcGISRuntime::Symbol *lineSymbol() const
    Esri::ArcGISRuntime::Symbol *midVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *multipleSnapCandidatesSymbol() const
    float opacity() const
    Esri::ArcGISRuntime::Symbol *rotateHandleSymbol() const
    Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *selectedVertexSymbol() const
    void setBoundingBoxHandleSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol)
    void setBoundingBoxSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxSymbol)
    void setFeedbackLineSymbol(Esri::ArcGISRuntime::Symbol *feedbackLineSymbol)
    void setFeedbackVertexSymbol(Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol)
    void setFillSymbol(Esri::ArcGISRuntime::Symbol *fillSymbol)
    void setLineSymbol(Esri::ArcGISRuntime::Symbol *lineSymbol)
    void setMidVertexSymbol(Esri::ArcGISRuntime::Symbol *midVertexSymbol)
    void setMultipleSnapCandidatesSymbol(Esri::ArcGISRuntime::Symbol *multipleSnapCandidatesSymbol)
    void setOpacity(float opacity)
    void setRotateHandleSymbol(Esri::ArcGISRuntime::Symbol *rotateHandleSymbol)
    void setSelectedMidVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol)
    void setSelectedVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedVertexSymbol)
    void setSnappedToLineSymbol(Esri::ArcGISRuntime::Symbol *snappedToLineSymbol)
    void setSnappedToVertexSymbol(Esri::ArcGISRuntime::Symbol *snappedToVertexSymbol)
    void setVertexSymbol(Esri::ArcGISRuntime::Symbol *vertexSymbol)
    void setVertexTextSymbol(Esri::ArcGISRuntime::Symbol *vertexTextSymbol)
    Esri::ArcGISRuntime::Symbol *snappedToLineSymbol() const
    Esri::ArcGISRuntime::Symbol *snappedToVertexSymbol() const
    Esri::ArcGISRuntime::Symbol *vertexSymbol() const
    Esri::ArcGISRuntime::Symbol *vertexTextSymbol() const

    Detailed Description

    Each GeometryEditorTool has a GeometryEditorStyle which controls the appearance of the different elements of the GeometryEditor::geometry. You can change the symbology used for vertices, selections, lines and fills. For example, in a Feature or Graphic editing workflow, you can set the lineSymbol to match the symbol of a polyline geometry in order to provide visual consistency.

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

    You can change the opacity of the overall style, or alternatively set different opacity (alpha) values on the individual symbols of the style, so that the underlying map components are visible through the geometry being edited.

    You can set each symbol to nullptr - consider carefully how this can affect your workflows, as you will not be able to see, select, or otherwise interact with those GeometryEditorElement types.

    When snapping is enabled (SnapSettings::isEnabled), the visual cues that indicate to a user when snapping has occurred can be customized using snappedToVertexSymbol, snappedToLineSymbol, and multipleSnapCandidatesSymbol.

    See also InteractionConfiguration, ReticleInteractionConfiguration, and Symbol.

    Member Function Documentation

    [explicit] GeometryEditorStyle::GeometryEditorStyle(QObject *parent = nullptr)

    Creates a new GeometryEditorStyle with a consistent set of red symbols, and displays white numbers on vertices.

    • parent - The optional parent QObject.

    Using this constructor results in the same default symbology as the VertexTool::style.

    [override virtual] GeometryEditorStyle::~GeometryEditorStyle()

    Destructor.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::boundingBoxHandleSymbol() const

    Returns the symbol used to draw control handles for interactive scaling when a scalable element is selected in the GeometryEditor and InteractionConfiguration::isAllowScalingSelectedElement is true.

    When the GeometryEditor::selectedElement is scalable, this symbol displays control handles to allow interactive scaling (resizing) of the element. The handles are drawn upon the bounding box (see boundingBoxSymbol). If the selected element cannot be scaled (see GeometryEditorElement::canScale) then this symbol is ignored and no handles are drawn.

    The default symbol is a white square SimpleMarkerSymbol with a black outline. Use either a MarkerSymbol or an appropriate advanced symbol if setting this property.

    {GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)}

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setBoundingBoxHandleSymbol(), InteractionConfiguration::isAllowScalingSelectedElement, and Esri::ArcGISRuntime::GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&).

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::boundingBoxSymbol() const

    Returns the symbol used to draw a bounding box when a movable, rotatable, or scalable element is selected in the GeometryEditor and InteractionConfiguration::isAllowScalingSelectedElement is true.

    When the GeometryEditor::selectedElement is movable, rotatable, or scalable, this symbol displays its minimum bounding box. If the selected element cannot be moved (GeometryEditorElement::canMove), rotated (GeometryEditorElement::canRotate), or scaled (GeometryEditorElement::canScale) then this symbol is ignored and no box is drawn.

    Control handles for interactively scaling the element are drawn upon the bounding box (see boundingBoxHandleSymbol).

    The default value is a dashed black SimpleLineSymbol. Use either a LineSymbol, a FillSymbol, or an appropriate advanced symbol if setting this property.

    {InteractionConfiguration::isAllowScalingSelectedElement}, {Esri::ArcGISRuntime::GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)} {GeometryEditor::scaleSelectedElement(double, double, const Esri::ArcGISRuntime::Point&)}

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setBoundingBoxSymbol() and Esri::ArcGISRuntime::InteractionConfiguration::isAllowScalingSelectedElement.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::feedbackLineSymbol() const

    Returns the symbol used to draw the edges currently being changed by an interactive edit, when editing polyline or polygon geometries.

    During an interactive edit, this symbol displays the current location of edges (polylines, or boundaries of polygons) that are changed by the interaction in progress. Unchanged lines remain displayed with lineSymbol.

    The default value is a dotted red SimpleLineSymbol.

    See also setFeedbackLineSymbol() and feedbackVertexSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::feedbackVertexSymbol() const

    Returns the symbol used to draw vertices currently being changed by an interactive edit, when editing any geometry type.

    During an interactive edit, this symbol displays the current location of vertices that are changed by the interaction in progress. Unchanged vertices remain displayed with vertexSymbol.

    Vertex numbers are not displayed for the changed vertices. For most tools, the default value is the same as the default vertexSymbol. For a ReticleVertexTool, the default value is similar to the default vertexSymbol but a larger size, helping you distinguish when you have started a move.

    See also setFeedbackVertexSymbol(), feedbackVertexSymbol, and vertexTextSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::fillSymbol() const

    Returns the symbol used to fill the current geometry when editing polygon geometries.

    The default value is a red semi-transparent SimpleFillSymbol with a red outline.

    See also setFillSymbol() and lineSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::lineSymbol() const

    Returns the symbol used to draw the current geometry when editing polyline geometries, and the outline of the geometry when editing polygon geometries.

    The default value is a solid red SimpleLineSymbol.

    See also setLineSymbol(), feedbackLineSymbol, and fillSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::midVertexSymbol() const

    Returns the symbol used to draw the mid-vertices of the current geometry when editing polygon or polyline geometries.

    Mid-vertices do not exist in the GeometryEditor::geometry, but instead exist only in the display, located between vertices in polygon and polyline geometries as a visual cue for interactive editing. When moved interactively, a new vertex is inserted at that location.

    If nullptr, no mid-vertex is displayed. In this case, you can still insert vertices between existing vertices by selecting an existing GeometryEditorVertex and tapping on the map.

    See also setMidVertexSymbol(), GeometryEditorMidVertex, vertexSymbol, and selectedMidVertexSymbol.

    [since Esri::ArcGISRuntime 200.4] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::multipleSnapCandidatesSymbol() const

    Returns the symbol used to indicate that multiple candidates for snapping exist at the interactive edit position, when the GeometryEditor has snapped the interaction position to the best candidate.

    This symbol may indicate, for example, an intersection of any two different graphic or feature geometries, two very close graphic or feature geometries, the presence of multiple vertices, or a self-intersection of a graphic or feature geometry. The snappedToLineSymbol and/or snappedToVertexSymbol will also be displayed when this symbols is displayed.

    The default value is a marker symbol showing an orange ring.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also setMultipleSnapCandidatesSymbol(), SnapSettings, snappedToVertexSymbol, and snappedToLineSymbol.

    float GeometryEditorStyle::opacity() const

    Returns the opacity of the GeometryEditor display in the view, a value between 0 (fully transparent) and 1 (fully opaque). Default is 1.

    It can be useful to change opacity of the entire GeometryEditor display to allow features, graphics, or imagery in the underlying map view to show through the geometry editor display, which can help allow precise placement of new vertices relative to those map components.

    Alternatively, you can set opacity separately on each of the symbols used by this style, allowing you to make specific aspects of the geometry editor semi-transparent.

    See also setOpacity() and GeometryEditor::isVisible.

    [since Esri::ArcGISRuntime 200.2] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::rotateHandleSymbol() const

    Returns the symbol used to draw a control handle for interactive rotation of the selected element, when a rotatable element is selected in the GeometryEditor and InteractionConfiguration::isAllowRotatingSelectedElement is true.

    When the GeometryEditor::selectedElement is rotatable, this symbol displays a control handle to allow interactive rotation of the element. The handle is drawn above the top of the bounding box (see boundingBoxSymbol). If the selected element cannot be rotated (see GeometryEditorElement::canRotate) then this symbol is ignored and no rotation handle is drawn.

    The default symbol is a black circular arrow advanced marker symbol. Use either a MarkerSymbol or an appropriate advanced symbol if setting this property.

    {InteractionConfiguration::isAllowRotatingSelectedElement}, {Esri::ArcGISRuntime::GeometryEditor::rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)} {GeometryEditor::rotateSelectedElement(double, const Esri::ArcGISRuntime::Point&)}

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also setRotateHandleSymbol() and Esri::ArcGISRuntime::InteractionConfiguration::isAllowRotatingSelectedElement.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::selectedMidVertexSymbol() const

    Returns the symbol used to draw the currently selected mid-vertex of the current geometry when editing polygon or polyline geometries.

    When a mid-vertex is selected, it is displayed with this symbol instead of midVertexSymbol.

    As soon as a mid-vertex is moved interactively, it is replaced by a vertex that is part of the GeometryEditor::geometry, and is displayed with the selectedVertexSymbol.

    {InteractionConfiguration::isAllowMidVertexSelection}, {Esri::ArcGISRuntime::ReticleInteractionConfiguration::isAllowMidVertexSelection} {ReticleInteractionConfiguration::isAllowMidVertexSelection}

    See also setSelectedMidVertexSymbol(), midVertexSymbol, selectedVertexSymbol, GeometryEditorMidVertex, and Esri::ArcGISRuntime::InteractionConfiguration::isAllowMidVertexSelection.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::selectedVertexSymbol() const

    Returns the symbol used to draw the currently selected vertex of the current geometry when editing any geometry type.

    This symbol can be used to emphasize the currently selected vertex, which can be useful if you require extra emphasis in addition to the selection halo, or wish to make the selected vertex a larger target for user interactions.

    {InteractionConfiguration::isAllowVertexSelection}, {Esri::ArcGISRuntime::ReticleInteractionConfiguration::isAllowVertexSelection} {ReticleInteractionConfiguration::isAllowVertexSelection}

    See also setSelectedVertexSymbol(), vertexSymbol, selectedMidVertexSymbol, GeometryEditorVertex, and Esri::ArcGISRuntime::InteractionConfiguration::isAllowVertexSelection.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setBoundingBoxHandleSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxHandleSymbol)

    Sets the boundingBoxHandleSymbol to boundingBoxHandleSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also boundingBoxHandleSymbol.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setBoundingBoxSymbol(Esri::ArcGISRuntime::Symbol *boundingBoxSymbol)

    Sets the boundingBoxSymbol to boundingBoxSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also boundingBoxSymbol.

    void GeometryEditorStyle::setFeedbackLineSymbol(Esri::ArcGISRuntime::Symbol *feedbackLineSymbol)

    Sets the feedbackLineSymbol to feedbackLineSymbol.

    See also feedbackLineSymbol.

    void GeometryEditorStyle::setFeedbackVertexSymbol(Esri::ArcGISRuntime::Symbol *feedbackVertexSymbol)

    Sets the feedbackVertexSymbol to feedbackVertexSymbol.

    See also feedbackVertexSymbol.

    void GeometryEditorStyle::setFillSymbol(Esri::ArcGISRuntime::Symbol *fillSymbol)

    Sets the fillSymbol to fillSymbol.

    See also fillSymbol.

    void GeometryEditorStyle::setLineSymbol(Esri::ArcGISRuntime::Symbol *lineSymbol)

    Sets the lineSymbol to lineSymbol.

    See also lineSymbol.

    void GeometryEditorStyle::setMidVertexSymbol(Esri::ArcGISRuntime::Symbol *midVertexSymbol)

    Sets the midVertexSymbol to midVertexSymbol.

    See also midVertexSymbol.

    [since Esri::ArcGISRuntime 200.4] void GeometryEditorStyle::setMultipleSnapCandidatesSymbol(Esri::ArcGISRuntime::Symbol *multipleSnapCandidatesSymbol)

    Sets the multipleSnapCandidatesSymbol to multipleSnapCandidatesSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also multipleSnapCandidatesSymbol.

    void GeometryEditorStyle::setOpacity(float opacity)

    Sets the opacity to opacity.

    See also opacity.

    [since Esri::ArcGISRuntime 200.2] void GeometryEditorStyle::setRotateHandleSymbol(Esri::ArcGISRuntime::Symbol *rotateHandleSymbol)

    Sets the rotateHandleSymbol to rotateHandleSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.2.

    See also rotateHandleSymbol.

    void GeometryEditorStyle::setSelectedMidVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedMidVertexSymbol)

    Sets the selectedMidVertexSymbol to selectedMidVertexSymbol.

    See also selectedMidVertexSymbol.

    void GeometryEditorStyle::setSelectedVertexSymbol(Esri::ArcGISRuntime::Symbol *selectedVertexSymbol)

    Sets the selectedVertexSymbol to selectedVertexSymbol.

    See also selectedVertexSymbol.

    [since Esri::ArcGISRuntime 200.4] void GeometryEditorStyle::setSnappedToLineSymbol(Esri::ArcGISRuntime::Symbol *snappedToLineSymbol)

    Sets the snappedToLineSymbol to snappedToLineSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also snappedToLineSymbol.

    [since Esri::ArcGISRuntime 200.4] void GeometryEditorStyle::setSnappedToVertexSymbol(Esri::ArcGISRuntime::Symbol *snappedToVertexSymbol)

    Sets the snappedToVertexSymbol to snappedToVertexSymbol.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also snappedToVertexSymbol.

    void GeometryEditorStyle::setVertexSymbol(Esri::ArcGISRuntime::Symbol *vertexSymbol)

    Sets the vertexSymbol to vertexSymbol.

    See also vertexSymbol.

    void GeometryEditorStyle::setVertexTextSymbol(Esri::ArcGISRuntime::Symbol *vertexTextSymbol)

    Sets the vertexTextSymbol to vertexTextSymbol.

    See also vertexTextSymbol.

    [since Esri::ArcGISRuntime 200.4] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::snappedToLineSymbol() const

    Returns the symbol used to indicate an edge (segment) of a graphic or feature geometry during an interactive edit, when the GeometryEditor has snapped the interaction position to that edge.

    This symbol is shown when an edge (segment) is the best candidate to snap the edit position to. It may be shown in addition to snappedToVertexSymbol, because the end of a segment effectively shares the same position as the vertices that define the start and end of that segment.

    The default value is a solid orange line.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also setSnappedToLineSymbol(), SnapSettings, snappedToVertexSymbol, and multipleSnapCandidatesSymbol.

    [since Esri::ArcGISRuntime 200.4] Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::snappedToVertexSymbol() const

    Returns the symbol used to indicate a vertex of a graphic or feature geometry during an interactive edit, when the GeometryEditor has snapped the interaction position to that vertex.

    This symbol is shown when a vertex is the best candidate to snap the edit position to. When the vertex being edited has been snapped to a vertex, the feedbackVertexSymbol is also adjusted to this position, which may differ slightly from the (unsnapped) pointer position. This symbol is drawn on top of the feedbackVertexSymbol.

    The default value is an orange circle marker symbol.

    This function was introduced in Esri::ArcGISRuntime 200.4.

    See also setSnappedToVertexSymbol(), SnapSettings, snappedToLineSymbol, and multipleSnapCandidatesSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::vertexSymbol() const

    Returns the symbol used to draw the vertices of the current geometry when editing any geometry type.

    Setting a larger symbol can help users on touch devices select and work with vertices, especially for field apps where users may wear thick gloves that work with touch screens.

    If nullptr, the vertices of the geometry are not explicitly displayed. By default when using a FreehandTool, this is nullptr, as you work with geometry parts instead of individual vertices. For a VertexTool or ReticleVertexTool, consider your workflow carefully before setting this property to nullptr, as you must be able to see vertices in order to select, move, or otherwise interact with them.

    See also setVertexSymbol(), selectedVertexSymbol, vertexTextSymbol, and midVertexSymbol.

    Esri::ArcGISRuntime::Symbol *GeometryEditorStyle::vertexTextSymbol() const

    Returns the symbol used to draw vertex numbers for the current geometry. If nullptr, no numbers are displayed.

    By default when using a FreehandTool, this symbol is nullptr.

    See also setVertexTextSymbol().

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