The FeatureSnappingLayerSource specifies which layers will be utilized for snapping in the SnappingOptions.
Known Limitations
- Layer types currently supported for snapping include: FeatureLayer, GraphicsLayer, GeoJSONLayer, WFSLayer, and CSVLayer.
- See also:
Example:
// Create a new instance of Sketch, and set
// a layer for one of the featureSources property.
// This enables feature snapping on that layer.
const Sketch = new Sketch({
layer: graphicsLayer,
view: view,
snappingOptions: { // autocasts to SnappingOptions()
enabled: true, // global snapping is turned on
// assigns a collection of FeatureSnappingLayerSource() and enables feature snapping on this layer
featureSources: [{ layer: graphicsLayer, enabled: true }]
}
});
Constructors
-
new FeatureSnappingLayerSource(properties)
-
Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Name | Type | Summary | Class | |
---|---|---|---|---|
String | more details The name of the class. | more details | Accessor | |
Boolean | more details Indicates whether feature snapping is turned on or off. | more details | FeatureSnappingLayerSource | |
FeatureLayer|GraphicsLayer|GeoJSONLayer|CSVLayer|WFSLayer | more details The source layer used for snapping. | more details | FeatureSnappingLayerSource |
Property Details
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
enabled Boolean
-
Indicates whether feature snapping is turned on or off.
- Default Value:true
-
-
The source layer used for snapping.
- See also: