Hello,
Example 1 :
var map = new Map("map", {
basemap: "dark-gray",
zoom: 3,
});
layer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0");
attributes = { objectid: 119369, typdamage: "Update successfully" };
feature = new Graphic( null, null, attributes );
map.addLayer(layer);
map.onLayerAddResult = () => {
layer.applyEdits(null, [feature], null,
function (add, update, del) {
console.log('success', update);
});
};
Exemple 2 :
var map = new Map("map", {
basemap: "dark-gray",
zoom: 3,
});
layer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0");
attributes = { objectid: 119369, typdamage: "Update successfully" };
feature = new Graphic( null, null, attributes );
map.addLayer(layer);
setTimeout(() => {
layer.applyEdits(null, [feature], null,
function (add, update, del) {
console.log('success', update);
},
function (error) {
console.log('error applyEdits \n', error);
});
}, 2000);
Bertrand