I have successfully added a set of symbols as entities of a cesium viewer (map). Now I'd like to clear all the symbols but when I try this:
viewer.entities.removeAll()
nothing happens.
What is the right way to clear a cesium map?
I have successfully added a set of symbols as entities of a cesium viewer (map). Now I'd like to clear all the symbols but when I try this:
viewer.entities.removeAll()
nothing happens.
What is the right way to clear a cesium map?
If you added the entities individually with viewer.entities.add(...), then calling the function you mentioned should be the right answer.
viewer.entities.removeAll()
However, if some of the entities were added as part of a dataSource (a collection of entities), you will have to remove either the dataSource or all of the dataSource's own entities.
Give this a try:
viewer.dataSources.removeAll();