Interface ISnapSource
Indicates a source of geometries that a GeometryEditor could snap interactive edits to.
Namespace: Esri.ArcGISRuntime.UI.Editing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public interface ISnapSource
Remarks
ISnapSource is implemented by objects that can provide a source of geometries to snap interactive edits to when using the GeometryEditor. For example, a feature layer or graphics overlay can provide a set of geometries that you may want your users to snap to.
Following a call to SyncSourceSettings(), the SourceSettings collection
is populated with SnapSourceSettings objects that are valid for snapping. Each represents a ISnapSource
that is in the currently connected map, is suitable for snapping, and is loaded. For each ISnapSource you
want to allow snapping to, set the corresponding IsEnabled to true
.
Snapping is used to maintain data integrity between different sources of data when editing, so it is important
that each ISnapSource provides full resolution geometries to be valid for snapping. This means that
some of the default optimizations used to improve the efficiency of data transfer and display of polygon and
polyline layers based on feature services are not appropriate for use with snapping. To snap to polygon
and polyline layers based on a
- Set the feature tiling mode to
, and - Use the default feature request mode
You can configure these properties on a per-layer basis using
Layers and graphics overlays providing a valid source of geometries for snapping are represented by a corresponding SnapSourceSettings object in the SourceSettings collection after SyncSourceSettings() returns.
Alternative approaches to create a valid snappable layer for polygon or polyline hosted feature layers are to:
- Disable feature tiling using
, and use . - Use
with any feature tiling mode.
If your app sets ServiceCurveGeometryMode to
Local data sources, such as geodatabases, always provide full resolution geometries. Point and multipoint feature layers are also always full resolution.
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 |