SnapSourceSettings Class

  • SnapSourceSettings
  • class Esri::ArcGISRuntime::SnapSourceSettings

    Configures a valid source of geometries that the GeometryEditor can snap interactive edits to. More...

    Header: #include <SnapSourceSettings.h>
    Since: Esri::ArcGISRuntime 200.4
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    virtual ~SnapSourceSettings() override
    bool isEnabled() const
    void setEnabled(bool enabled)
    Esri::ArcGISRuntime::SnapSource *source() const

    Detailed Description

    Following a call to SnapSettings::syncSourceSettings, the SnapSettings::sourceSettings collection is populated with SnapSourceSettings objects that are valid for snapping. Each represents a SnapSource that is in the currently connected map and provides full resolution geometries suitable for snapping.

    Set isEnabled to true for each item that you want allow your users to snap to. You may wish to delegate the choice of snapping sources to users by binding the collection of snapping sources to controls which allow them to change isEnabled for each snapping source individually.

    Snapping works for visible objects within a visible SnapSource - for example if a feature layer or graphics overlay is not visible due to the current scale range, definition expression, or other reason, it will not participate in snapping at that time. Visibility does not affect whether a SnapSourceSettings object is present in the SnapSettings::sourceSettings collection or not.

    See SnapSource for more information about which data sources are valid for snapping.

    See also SnapSettings and SnapSource.

    Member Function Documentation

    [override virtual] SnapSourceSettings::~SnapSourceSettings()

    Destructor.

    bool SnapSourceSettings::isEnabled() const

    Returns true to enable snapping to the geometries in the SnapSource, false otherwise. Default is false.

    Snapping sources can be enabled or disabled individually. If SnapSettings::isEnabled is false, this value is ignored and snapping is not enabled.

    See also SnapSettings.

    void SnapSourceSettings::setEnabled(bool enabled)

    Sets the enabled to enabled.

    See also isEnabled.

    Esri::ArcGISRuntime::SnapSource *SnapSourceSettings::source() const

    Returns underlying source of geometries to snap to, for example a FeatureLayer or GraphicsOverlay.

    See also SnapSettings.

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