Hi,
I am not able to delete the feature from editable feature layer, While i am able to create and update the feature. Here the scenario is to delete the existing feature and create the new feature and update the attributes. PFB code
var newFeatureLayer = new FeatureLayer(urlparcel);
newFeatureLayer.on("edits-complete", function(evt) {
if(evt.adds.length >0 && evt.adds[0].success == true)
{.....}
else if(evt.updates.length >0 && evt.updates[0].success == true)
{...}
else if(evt.updates.length >0 && evt.updates[0].success == true)
{.....}
});
newFeatureLayer.applyEdits(null, null, [existingFeature]); // existing feature is the selected feature on map load and to be deleted
var newUGraphics = new Graphic(newGeometry); // newGeometry is the new selected geometry and need to be created
newFeatureLayer.applyEdits([newUGraphics],null,null);
The "on edits-complete" event is triggering, when i am trying to create feature but not on deleting the existing feature. And while creating feature in "edits-complete" function , though it smoothly creating the feature but one error occurred at console "init.js:182 Error: Unable to complete operation." I believe this is the error for delete operation which was not happened properly.
Please help me on how the feature has to deleted from editable feature layer.
Thanks,
Shaikh Rizuan
Solved! Go to Solution.
It starts working when the new feature is created first and then deleteting the existing one.. earlier i way trying to delete first then creating the feature.
I don't know what may be the issue, if i delete the feature first and then create.
Hello,
Please check your feature service
to active delete in feature services required to marked as active...
Yes it is there...
It starts working when the new feature is created first and then deleteting the existing one.. earlier i way trying to delete first then creating the feature.
I don't know what may be the issue, if i delete the feature first and then create.
Can you please close this thread and mark as answered...