Issue with Editor Widget and polygons > 4.20

1732
12
07-28-2021 01:56 AM
MatthieuThery1
Occasional Contributor

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 

MatthieuThery1_0-1627461825794.png

it was working ok in 4.18

 

edit: it seems it's affecting only layers that have Z values enabled. if that helps

Tags (3)
0 Kudos
12 Replies
JoseBanuelos
Esri Contributor

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

SBerg_VHB
Occasional Contributor

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.

0 Kudos
JoseBanuelos
Esri Contributor

Hello @SBerg_VHB and @MatthieuThery1 ,

We have fixed this for version 4.21!

Thanks,

Jose

MatthieuThery1
Occasional Contributor

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:

MatthieuThery1_0-1631288165048.png

 

which seems to be related to snapping. It was working fine in 4.19.

 

Thanks

0 Kudos
JoseBanuelos
Esri Contributor

@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

0 Kudos
MatthieuThery1
Occasional Contributor

@JoseBanuelos 

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).

 

0 Kudos
JoseBanuelos
Esri Contributor

@MatthieuThery1 ,

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

0 Kudos
MatthieuThery1
Occasional Contributor

@JoseBanuelos 

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

0 Kudos
JoseBanuelos
Esri Contributor

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