Configures a valid source of geometries that the GeometryEditor can snap interactive edits to. More...
Detailed DescriptionFollowing a call to SnapSettings::syncSourceSettings or SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior), 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.
FeatureLayer, GraphicsOverlay, SubtypeFeatureLayer, and SubtypeSublayer objects are types of snap source. For SubtypeFeatureLayer snap sources, the childSourceSettings collection is populated with SubtypeSublayer snap sources.
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. When rule-based snapping is configured, interactive snapping behavior is affected by the SnapRules used in SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior). See SnapRules and ruleBehavior for more information.
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.
Relevant samples:
[override virtual noexcept]
SnapSourceSettings::~SnapSourceSettings()
Destructor.
[since Esri::ArcGISRuntime 200.7]
QList<Esri::ArcGISRuntime::SnapSourceSettings *> SnapSourceSettings::childSourceSettings() const
Returns a collection of SnapSourceSettings objects representing the child snap sources of source, when the snap source is a SubtypeFeatureLayer.
When this snap source is a SubtypeFeatureLayer, this collection contains a SnapSourceSettings object corresponding to each SubtypeSublayer of that layer, in the same order as the SubtypeFeatureLayer::subtypeSublayers collection.
This collection is empty when the source is not a SubtypeFeatureLayer.
This function was introduced in Esri::ArcGISRuntime 200.7.
bool SnapSourceSettings::isEnabled() constReturns 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 or SnapSettings::isFeatureSnappingEnabled are false
, this value is ignored and interactive snapping is not enabled to this SnapSource.
If rule-based snapping is configured, this value is affected by the value of SnapSourceEnablingBehavior passed to SnapSettings::syncSourceSettings(Esri::ArcGISRuntime::SnapRules*, Esri::ArcGISRuntime::SnapSourceEnablingBehavior). In this case, ruleBehavior also affects if interactive snapping occurs for this snap source, and which parts of the snap source can be snapped to. See SnapRules for more information about configuring rule-based snapping.
See also SnapSettings and SnapSourceEnablingBehavior.
[since Esri::ArcGISRuntime 200.7]
Esri::ArcGISRuntime::SnapRuleBehavior SnapSourceSettings::ruleBehavior() const
Returns how SnapRules affect the interactive snapping behavior of this SnapSourceSettings.
This value indicates how interactive snapping behavior is affected by SnapRules, which may allow, limit, or prevent snapping to this SnapSourceSettings. Rule-based snapping is configured by calling SnapSettings::syncSourceSettings(SnapRules*, SnapSourceEnablingBehavior) - see SnapRules for more information about configuring a GeometryEditor with rule-based snapping.
If rule-based snapping is not configured (if snap sources were synchronized by calling SnapSettings::syncSourceSettings), then this value will be SnapRuleBehavior::None for all SnapSourceSettings in the SnapSettings::sourceSettings collection.
This information can be used to provide UI feedback to end users about which SnapSourceSettings can be snapped to. For example if your app presents a list of snap sources to the end user to enable or disable, you may wish to exclude SnapRuleBehavior::RulesPreventSnapping snap sources because they cannot actually be snapped to, regardless of the value of isEnabled.
This function was introduced in Esri::ArcGISRuntime 200.7.
See also SnapRules.
void SnapSourceSettings::setEnabled(bool enabled)Sets the enabled to enabled.
See also isEnabled.
Esri::ArcGISRuntime::SnapSource *SnapSourceSettings::source() constReturns underlying source of geometries to snap to, for example a FeatureLayer, SubtypeFeatureLayer, SubtypeSublayer, or GraphicsOverlay.
See also SnapSettings.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4