Hi, I'm using the Measurement widget in 2D and I would like this 'New measurement' button to go away after I have done my measurements in the widget. I do not a delete button in the widget and I have to close ( make it go from a '+' symbol to pointer) it by hitting the esc button on my keyboard or clicking on the measure widget again.
I was hoping .destroy() at the last would do this but it doesn't .
Can I add a button to go out of the widget and also close this blue tab with it?
Thanks
You can use css to hide the button in the interface:
.esri-distance-measurement-2d__clear-button {
display: none;
}
If you want a button to clear measurements and reset the widget, you can create a button in your interface and use some JS like:
clearButton.addEventListener("click", function () {
measurement.clear();
});