Hello ArcGIS Community,
I'm using @arcgis/map-components in a React project to create a 3D map. I need to clear/reset the elevation profiles drawn with <arcgis-elevation-profile> when a button is clicked, but I can't find a documented method to achieve this.
My current setup:
// Elevation Profile component
<arcgis-elevation-profile
ref={elevationProfileRef}
></arcgis-elevation-profile>
// Clear button
<calcite-button
onClick={() => clearDrawings()}
icon-start="trash"
></calcite-button>
I need something like this:
function clearDrawings() {
try {
elevationProfileRef.current?.clear();
} catch (error) {
console.error("Error clearing drawings:", error);
}
}
Thanks in advance for your help!
Solved! Go to Solution.
Hi @EmrahAydemir ,
You should be able to do this by setting the input property to `null`
Hi @EmrahAydemir ,
You should be able to do this by setting the input property to `null`
Its worked well, thanks you so much...