当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS FeatureSnappingLayerSource用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/views/interactive/snapping/FeatureSnappingLayerSource"], (FeatureSnappingLayerSource) => { /* code goes here */ });

ESM: import FeatureSnappingLayerSource from "@arcgis/core/views/interactive/snapping/FeatureSnappingLayerSource";

类: esri/views/interactive/snapping/FeatureSnappingLayerSource

继承: FeatureSnappingLayerSource > Accessor

自从:用于 JavaScript 4.19 的 ArcGIS API

用法说明

FeatureSnappingLayerSource 指定哪些层将用于在 SnappingOptions 中进行捕捉。

已知限制

例子:

// 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 }]
  }
});

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 FeatureSnappingLayerSource。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。