How to clear graphics of all widgets ?
mayur9785 opened this issue · 1 comments
Hi,
How do i clear graphics of specific widget and also, loop through all widgets of viewer.js file and clear graphics ?
I have widgets Nagivation https://github.com/friendde/ArcGIS_JS_NavigationTools and added one more button of clear graphics.
I would like to clear graphics of specific widget and also loop through all widgets and clear graphics ?
Thanks,
You probably can't easily loop through all widgets and clear graphics layers for each widget. You can loop through all the graphics layers in the map and clear the graphics in each layer. Note that any Feature layers on the map (and a few others) are also graphics layers so you can't assume all graphic layers contain features added from a widget or other programmatic methods that can/should be cleared from the map.