I'm using the PolylineBuilder to, well, create a polyline. I have an "Edit button" that activates editing, and when it's activated another "Cancel button" is shown.
That's all working except when I click the "Cancel button", I want to permanently remove the graphics. This works the first time, but when I activate editing again and start to draw another polyline, it shows the previous graphics and continues to draw from the last point.
I've tried both:
var graphics = spanGraphicsOverlay.graphics;
They both clear/remove the graphics on the screen, but the graphics persist when I start creating a new polyline.
How would I completely remove the polyline graphic when I cancel the editing?