基本信息
以下是所在類或對象的基本信息。
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 中進行捕捉。
已知限製
- 當前支持捕捉的圖層類型包括:FeatureLayer、GraphicsLayer、GeoJSONLayer、WFSLayer 和 CSVLayer。
例子:
// 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 }]
}
});
相關用法
- JavaScript ArcGIS FeatureLayer.queryExtent用法及代碼示例
- JavaScript ArcGIS FeatureLayer.when用法及代碼示例
- JavaScript FeatureForm.when用法及代碼示例
- JavaScript ArcGIS FeatureLayer refresh事件用法及代碼示例
- JavaScript ArcGIS FeatureLayer.getFieldDomain用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryFeatureCount用法及代碼示例
- JavaScript FeatureForm.getValues用法及代碼示例
- JavaScript FeatureForm.visible用法及代碼示例
- JavaScript ArcGIS Feature.visible用法及代碼示例
- JavaScript ArcGIS FeatureLayer.formTemplate用法及代碼示例
- JavaScript ArcGIS Feature用法及代碼示例
- JavaScript FeatureForm.classes用法及代碼示例
- JavaScript ArcGIS FeatureLayer.relationships用法及代碼示例
- JavaScript ArcGIS FeatureLayer.objectIdField用法及代碼示例
- JavaScript ArcGIS FeatureReductionCluster用法及代碼示例
- JavaScript ArcGIS FeatureLayer.opacity用法及代碼示例
- JavaScript FeatureTemplates.on用法及代碼示例
- JavaScript ArcGIS FeatureLayer.queryRelatedFeatures用法及代碼示例
- JavaScript FeatureTemplates.GroupByFunction用法及代碼示例
- JavaScript ArcGIS FeatureLayer.datesInUnknownTimezone用法及代碼示例
- JavaScript FeatureForm.container用法及代碼示例
- JavaScript ArcGIS Feature.container用法及代碼示例
- JavaScript ArcGIS FeatureLayer.featureEffect用法及代碼示例
- JavaScript ArcGIS FeatureLayer.timeInfo用法及代碼示例
- JavaScript ArcGIS FeatureLayer.createQuery用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 FeatureSnappingLayerSource。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。