Hello,
I'm using Arcgis JS api 4.23 with angular using the arcgis/core package
I have an offline featurelayer, with no url, and the source is set to an empty array
when using the editor widget, I start drawing the graphic, the lines show fine, as soon as I double click to finish drawing, the shape (line or polygon) symbology disappears,
and only the vertices are still shown.
When saving and ending the add operation, the feature is displayed again properly.
what I already tried:
Added a renderer for layer.
Setting the drawing symbol of the editor widget's through supportingWidgetDefaults.sketch.polylineSymbol
Hide all layers, thinking it may go beneith any layer.
Following are screenshots of the different drawing phases,
second one shows the disappearance of the shape.
While drawing:
After completing the draw (double click)
After saving:
Solved! Go to Solution.
Ok, I found the solution, turned out to be a silly problem I'm responsible off.
The problem is that I was clearing map.layers before adding layers again,
And it seems that the Editor widget adds a graphics layer to the map layers collection, thus the shape would disappear.
Not sure it was working when the drawing phase is still active, or when editing.
So I made sure that I remove all layers except graphic layers.
Have a nice day!
Hi there,
So I tested client-side feature layer with polylines with Editor widget and I was not able to reproduce the behavior you described. Here is a simple codepen app I set up: https://codepen.io/U_B_U/pen/ExRBWpL?editors=1000
Thank you,
I tried it, it was the same
Ok, I found the solution, turned out to be a silly problem I'm responsible off.
The problem is that I was clearing map.layers before adding layers again,
And it seems that the Editor widget adds a graphics layer to the map layers collection, thus the shape would disappear.
Not sure it was working when the drawing phase is still active, or when editing.
So I made sure that I remove all layers except graphic layers.
Have a nice day!