• esri/views


AMD: require(["esri/views/interactive/snapping/FeatureSnappingLayerSource"], (FeatureSnappingLayerSource) => { /* code goes here */ });
ESM: import FeatureSnappingLayerSource from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource";
Class: esri/views/interactive/snapping/FeatureSnappingLayerSource
Inheritance: FeatureSnappingLayerSource Accessor
Since: ArcGIS API for JavaScript 4.19

The FeatureSnappingLayerSource specifies which layers will be utilized for snapping in the SnappingOptions.

Known Limitations

See also:
// 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 }]


new FeatureSnappingLayerSource(properties)
properties Object

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.
Show inherited properties Hide inherited properties
Name Type Summary Class
Stringmore details

The name of the class.

more detailsAccessor
Booleanmore details

Indicates whether feature snapping is turned on or off.

more detailsFeatureSnappingLayerSource
FeatureLayer|GraphicsLayer|GeoJSONLayer|CSVLayer|WFSLayermore details

The source layer used for snapping.

more detailsFeatureSnappingLayerSource

Property Details

declaredClass Stringreadonly inherited

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:

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.