What is the correct way to reset a map?
We have a button that a user clicks to load a map and display shapes on that map.
However if the user clicks the button again the original shapes remain on the map plus the new shapes are added to the map.
I've tried to destroy the map as well as clearing out the datasource but when I try either approach I can't get the shapes to render.
Please advise.