Select to view content in your preferred language

Sketch lines not visible in 2D in version 4.22

459
1
03-11-2022 05:26 PM
ironmaskito
Occasional Contributor

After updating ArcGIS from 4.21 to 4.22 I noticed that sketched lines are not visible in 2D view. I am using SketchViewModel with a custom UI instead of Sketch Widget, which works fine. Below, I sketched 3 vertices, but the lines between the vertices are missing. When I complete the sketch, the lines do not appear either. Sketching lines works fine in 3D view and also when I sketch other shapes.

invisible line bugfix.png

I am also able to get the lines to appear in 2D when I remove all the graphics from the sketchVM's layer and add the cloned graphics back to the layer.

      sketchVM.getLayer().removeAll();
      sketchVM.getLayer().add(graphic);
      sketchVM.update(graphic, { tool: 'reshape' });
 
However, I would like to see the lines appear while editing the shape as I did in 4.21. Is this a bug in 4.22?

 

SOLVED

So the problem ended up being the Color attribute's alpha value was undefined, resulting in polyline not being visible except for the vertices. An undefined alpha value in v4.21 did not cause visibility issues of polyline while in 4.22 it results in the edges of a line not being visible. I don't see this documented anywhere?

0 Kudos
1 Reply
JoseBanuelos
Esri Contributor

@ironmaskito 
Could you provide a reproducible sample app? Just want to make sure we look at the exact issue you ran into. 

Thanks,

Jose

0 Kudos