Class SnapSettings
Controls interactive snapping functionality for the Geometry
Inheritance
Implements
Namespace: Esri.ArcGISRuntime.UI.Editing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public sealed class SnapSettings : INotifyPropertyChanged
Remarks
Snapping allows you to create geometries that connect to each other and are coincident, so that interactive edits are more accurate, with fewer errors.
If Istrue
and a user edits a geometry interactively, then the position of the
interactive edit is adjusted to coincide with ("snap to") other geometry edges (segments) or vertices.
When the edit position has been adjusted, visual cues show the user the adjusted edit position, and which aspect
of the referenced geometry was used as the best candidate for that adjustment. You can enable different types
of snapping:
-
Is
Feature allows snapping to other features or graphics.Snapping Enabled -
Is
Geometry allows snapping to the current Geometry.Guides Enabled
To use snapping in the Geometry
- Connect a Geometry
Editor to a map view using GeometryEditor . - Get the Snap
Settings and set IsEnabled totrue
. - To snap to other features or graphics in the map view:
- Ensure the Map and any layers in it are loaded. Only layers that provide full resolution geometries can be used for snapping.
-
Call Sync
Source , and then set IsSettings() Enabled totrue
for each ISnapSource that you want users to be able to snap to. You may wish to enable all the SnapSource , use only select sources, or delegate the choice to your users.Settings
- Call one of the start methods on Geometry
Editor to allow the end user to create or edit a new geometry using the current SnapSettings . - You can also call Sync
Source to refresh the collection of snap sources at any time. The state of any existing SnapSettings() Source is preserved by this call.Settings
You can snap to ISnap
The visual cues that indicate to a user when snapping has occurred can be customized using
Snapped
Constructors
Name | Description |
---|---|
Snap |
Initializes a new instance of the Snap |
Properties
Name | Description |
---|---|
Is |
Gets or sets a value indicating whether interactive geometry edits made using the Geometry |
Is |
Gets or sets a value indicating whether to allow interactive snapping to other features and graphics, based on the configured Source |
Is |
Gets or sets a value indicating whether to allow interactive snapping relative to the current Geometry, |
Is |
Gets or sets a value indicating whether to enable haptic feedback whenever a snap occurs (if supported by the device), |
Source |
Gets the collection of snapping sources and whether or not each is enabled for snapping. |
Tolerance | Gets or sets a radius in device-independent pixels (DIP) that specifies how close the interactive edit position must be to the snapping source geometry in order to trigger the snap. |
Methods
Name | Description |
---|---|
Sync |
Synchronizes the Source |
Events
Name | Description |
---|---|
Property |
Occurs when a non-dependency property value changes. |
See Also
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 200.4 - 200.6 |
.NET | 200.4 - 200.6 |
.NET Windows | 200.4 - 200.6 |
.NET Android | 200.4 - 200.6 |
.NET iOS | 200.4 - 200.6 |
.NET Framework | 200.4 - 200.6 |
UWP | 200.4 - 200.6 |