Hi everyone,
I'm having a problem with the snapping tool and I don't know how to figure it out.
I'm on a editing session, and after a insert a new object the snapper doesn't see the new inserted object and I can't snap on it.
These are the steps i do:
- start ad editing session (startReading/startEditing)
- load Editor widget and activate snapper on the layer
- draw (snappingTool works fine) and insert a new object (applyEdit)
- want to draw another new object snapping on the previously inserted object, but the snapper doesn't see it.
Is there a way to make snappingTool works with the new objects inserted during an editing Session?
Thanks in advance for your help
I'm using ArcGIS Map SDK 4.30
Hi Andrea, I had the same issue.
I suppose this is an already reported bug BUG-000152711, but it's still open and waiting for a fix.
I solved the problem with a workarond, after the applyEdit operation i force the historicMoment of the layers used by the SnappingTool passing it throwh the customParameters property.
_onApplyEditComplete: function (applyEditResult) {
let hm = applyEditResult.historicMoment;
this.editorWidget.snappingOptions.featureSources.items.forEach(singleItem => {
singleItem.layer.customParameters = {
historicMoment:hm.getTime()
};
});
}
By doing so, the parameter is correctly received and the SnappingTool correctly snap on new inserted object.