# Removing wms imagery and enteties with update

**URL:** <https://community.cesium.com/t/removing-wms-imagery-and-enteties-with-update/11647>\
**Category:** CesiumJS\
**Created:** [November 25, 2020, 9:06am UTC](https://community.cesium.com/t/removing-wms-imagery-and-enteties-with-update/11647 "2020-11-25T09:06:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrvojelovrich](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hrvojelovrich/32/3678_2.png) [@hrvojelovrich](https://community.cesium.com/u/hrvojelovrich)\
**Post date:** [November 25, 2020, 9:06am UTC](https://community.cesium.com/t/removing-wms-imagery-and-enteties-with-update/11647/1 "2020-11-25T09:06:05Z")

</div>

Hi,

I stuck with removing wms layer from viewer and some entities.

Adding wms works:  
viewer.imageryLayers.addImageryProvider(layer);

But can’t remove later from viewer:  
imageryLayers.remove(layer);

Removing entities also doesn’t work in my case (in fiddle link you will see slider range (primitive) and it should update position/height of watertable, it is working but it is not removing previous height).

doesn’t work:  
viewer.entities.remove(waterTable);

but works:  
viewer.entities.removeALL();

Please talk about logic refreshing entities. It was planned replace this slider with real live data from some sensors.

Thanks in advance, appreciate your time.  
Using now latest cesium 1.75  
Relative newbie also part of this code isn’t mine (static version).

> **[Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/ejovrh2/0xejoaud/1/)**

---

<div class="post-metadata">

**Author:** ![hrvojelovrich](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hrvojelovrich/32/3678_2.png) [@hrvojelovrich](https://community.cesium.com/u/hrvojelovrich)\
**Post date:** [December 7, 2020, 2:53pm UTC](https://community.cesium.com/t/removing-wms-imagery-and-enteties-with-update/11647/2 "2020-12-07T14:53:48Z")

</div>

Remove wms now works:

> **[Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/ejovrh2/0xejoaud/11/)**
