• GeometryEditorInteractionPreview
  • class Esri::ArcGISRuntime::GeometryEditorInteractionPreview

    Contains information on the preview of the geometry during interactive editing. More...

    Header: #include <GeometryEditorInteractionPreview.h>
    Since: Esri::ArcGISRuntime 300.1
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~GeometryEditorInteractionPreview() override
    Esri::ArcGISRuntime::GeometryEditorElement *interactionElement() const
    Esri::ArcGISRuntime::GeometryEditorInteractionType interactionType() const
    Esri::ArcGISRuntime::Geometry previewGeometry() const

    Detailed Description

    When the editing preview of the GeometryEditor changes, GeometryEditorInteractionPreview is a parameter that previews the changing geometry and the interacted GeometryEditorElement.

    Relevant samples:

    See also GeometryEditor.

    Member Function Documentation

    [override virtual noexcept] GeometryEditorInteractionPreview::~GeometryEditorInteractionPreview()

    Destructor.

    Esri::ArcGISRuntime::GeometryEditorElement *GeometryEditorInteractionPreview::interactionElement() const

    Returns the GeometryEditorElement that is being interacted with or created.

    When creating a new element, the interactionElement will be the new element being created.

    For example, when creating a new GeometryEditorVertex the interaction element will be a GeometryEditorVertex with the position of the vertex being created. When moving, scaling or rotating an existing element, the interactionElement will be the existing element being modified. For example, when scaling a GeometryEditorPart the interaction element will be the GeometryEditorPart being scaled with the geometry of the part being updated as the scaling occurs. Similarly, when moving a GeometryEditorGeometry the interaction element will be the GeometryEditorGeometry that is being moved which has the updated geometry as the movement occurs.

    The interaction element is returned in the same SpatialReference as the associated MapView. If the spatial reference of the preview geometry is nullptr and the map view has nullptr spatial reference, then the spatial reference of the interaction element will be nullptr.

    Esri::ArcGISRuntime::GeometryEditorInteractionType GeometryEditorInteractionPreview::interactionType() const

    Returns the type of geometry interaction that is occurring.

    Esri::ArcGISRuntime::Geometry GeometryEditorInteractionPreview::previewGeometry() const

    Returns a geometry previewing the changes made by the current interaction.

    If the GeometryEditor was started with an input geometry by calling GeometryEditor::start(const Esri::ArcGISRuntime::Geometry&), then the preview geometry is returned in the same SpatialReference as the input geometry. If the input geometry spatial reference is empty, or the editor was started using GeometryEditor::start(Esri::ArcGISRuntime::GeometryType), then the preview geometry is returned in the spatial reference of the associated MapView. If no spatial reference is set on either input geometry or via an associated map view, then the spatial reference of the preview geometry will be empty.

    See also GeometryEditor::geometry.