loadModules([
"esri/layers/FeatureLayer",
])
.then(([FeatureLayer]) => {
var featureLay = new FeatureLayer(
// 图层链接
"https://localhost:6443/arcgis/rest/services/", {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"]
});
//编辑要素
featureLay.applyEdits({
addFeatures: [{
attributes: {
name: 1
}
}], //添加要素数组
updateFeatures: graphics, //更新要素数组
deleteFeatures: [] //删除要素数组
}).then((res) => {
console.log(res);
}, (err) => {
console.log(err)
});
});
}
arcgis增删改查
最新推荐文章于 2024-06-10 22:18:41 发布