SnapSourceSettings class final
Configures a valid source of geometries that the GeometryEditor can snap interactive edits to.
Following a call to SnapSettings.syncSourceSettings or SnapSettings.syncSourceSettings(SnapRules, 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 SnapSourceSettings.childSourceSettings collection is populated with SubtypeSublayer snap sources.
Set SnapSourceSettings.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 SnapSourceSettings.isEnabled for each snapping source individually. When rule-based snapping is configured, interactive snapping behavior is affected by the SnapRules used in SnapSettings.syncSourceSettings(SnapRules, SnapSourceEnablingBehavior). See SnapRules and SnapSourceSettings.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.
- Implemented types
Properties
-
childSourceSettings
→ List<
SnapSourceSettings> -
A collection of SnapSourceSettings objects representing the child snap
sources of SnapSourceSettings.source, when the snap source is a
SubtypeFeatureLayer.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEnabled ↔ bool
-
True to enable snapping to the geometries in the SnapSource, false
otherwise. Default is false.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → SnapSource
-
Underlying source of geometries to snap to, for example a FeatureLayer,
SubtypeFeatureLayer, SubtypeSublayer, or GraphicsOverlay.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited