Hello,
We are having issues when using the Editor widget on some of our Feature Layers. It happens when we try and add a new polygon. It then crashes the widget and throws an error, so we're unable to add any features at all.
The error we're getting is the following
it was working ok in 4.18
edit: it seems it's affecting only layers that have Z values enabled. if that helps
Hello @MatthieuThery1 ,
There is an existing bug submitted recently for this issue BUG-000141323. This is caused when creating polygons with z-values. Point and polylines still work. This bug was introduced when snapping was added to the SketchViewModel at 4.19. Even though you may not be using snapping, you can still run into this issue.
I apologize for this, we are actively working on this bug, and hope to get this fixed for version 4.21.
Thanks,
Jose
Hi, we were also working through this problem and I just confirmed that republishing the data with has Z: false has worked around the above issue. Many thanks to @ShawnGoulet1 for keying me into this.
Hi, @JoseBanuelos
Not sure if this is linked to the above but we found an issue that happens when we try to use the cancel() method on the SketchViewModel, while updating/reshaping a polyline.
We are getting the following error:
which seems to be related to snapping. It was working fine in 4.19.
Thanks
@MatthieuThery1 ,
Can you provide a repro sample codepen? Can you provide the current version you are using, and the steps to reproduce this?
I tested this in 4.20 and our latest build today and I am not able to repro with SketchViewModel. There might be an additional step I'm missing that can lead to this issue.
Thanks,
Jose
Hi, I created a codepen here: https://codepen.io/mtrsklnkvMM/pen/xxrrLZP
I set the environment to 4.19, so as you can see the original behaviour.
steps:
1-Create a single polyline
2-click to select it and then click a second time to enter "reshape mode"
3-Try to move the middle vertex
4-It splits the line in half
Now If I switch to 4.20, it crashes the map in codepen (throws the error mentionned above in our app too).
Thanks for the repro sample and step, this is definitely an issue. We are looking into this, and thanks for bringing this up to our attention.
Thanks,
Jose
I had a look at 4.21, and it seems that the issue above has been partially fixed, as it doesn't crash the map anymore when doing :
if (toolEventInfo.type === 'vertex-add') sketch.undo();
if (toolEventInfo.type === 'reshape-start') sketch.cancel();
It just doesn't do anything to the line.
If I change and do :
if (toolEventInfo.type === 'vertex-add') sketch.undo();
if (toolEventInfo.type === 'reshape') sketch.cancel();
Then it splits the line like in 4.19, however the remaining half line seems to rotate a bit (see codePen https://codepen.io/mtrsklnkvMM/pen/xxrrLZP)
I have tried different things, but can't make it work. Do you have any idea to achieve what we're trying
( steps in message above)
Thank you
Hi @MatthieuThery1 ,
Apologies for these inconsistencies you are seeing. There were some updates done at 4.21 we hoped would have resolved this, and it appears partially resolved. I am also seeing the slight rotation. It depends on where you try to move the cursor up/down where we see the line rotate up/down. We will look into this further, and I will reach out directly to you if we have some additional questions.
Thanks,
Jose