# Reset Viewer

**URL:** <https://community.cesium.com/t/reset-viewer/6429>\
**Category:** CesiumJS\
**Created:** [January 4, 2018, 1:05pm UTC](https://community.cesium.com/t/reset-viewer/6429 "2018-01-04T13:05:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinay\_g](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vinay\_g](https://community.cesium.com/u/vinay_g)\
**Post date:** [January 4, 2018, 1:05pm UTC](https://community.cesium.com/t/reset-viewer/6429/1 "2018-01-04T13:05:51Z")

</div>

Hi

I have plotted some poly line, i want to reset the viewer and draw a new line.

How to reset or refresh Cesuim viewer?

Please help me out

Thanks and Regards

Vinay

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [January 4, 2018, 7:48pm UTC](https://community.cesium.com/t/reset-viewer/6429/2 "2018-01-04T19:48:43Z")

</div>

Hi Vinay,

This tutorial, [Visualizing Spatial Data](https://cesiumjs.org/tutorials/Visualizing-Spatial-Data/), will give you an overview of the Entity API.

To remove all Entities, you can call:

viewer.entities.removeAll();

``

Thanks,

Gabby

---

<div class="post-metadata">

**Author:** ![vinay\_g](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vinay\_g](https://community.cesium.com/u/vinay_g)\
**Post date:** [January 9, 2018, 8:45am UTC](https://community.cesium.com/t/reset-viewer/6429/3 "2018-01-09T08:45:04Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![Scott\_Haynes](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_haynes/32/2063_2.png) [@Scott\_Haynes](https://community.cesium.com/u/Scott_Haynes)\
**Post date:** [March 10, 2020, 9:18pm UTC](https://community.cesium.com/t/reset-viewer/6429/4 "2020-03-10T21:18:01Z")

</div>

Would calling the following clear everything?

viewer.dataSources.removeAll(true);

viewer.entities.removeAll();

We have some AAR kml files, and we need to be able to clear the entire scene. Is there a function that I’ve missed that does this automatically? 3D tiles?

Scott
