Image is not being cleared when polygon entity that uses the image is removed from datasource

I see some artifacts around the overlapping area while polygons with image fill are added. I looked into this issue (, and the suggested workaround didn't help me. So, I tried to workaround by displaying polygons at different height so that there won't be z-fighting issue. However, I came across the different issue now, which is as follows:

I've entities each with its image added to a datasource which are at different height starting from 0. When any entity is added to or removed from the datasource, the heights of entities are adjusted such that it starts from 0.

The problem that I have is that Cesium doesn't clear the image when I try to remove an entity from the datasource and adjust the height of the remaining entities. However, if I don't adjust the height after removing the entity, it works.

Sample example:

To reproduce the issue:
- Click "Add first entity"
- Click "Add second entity"
- Click "Remove second entity"

Expected: Removes the second entity along with the image.
Actual: Doesn't clear the image.

But, when I comment out line#11, it clears the image.

Any help would be really appreciated.


Hi Hari,

Thank you for the clear example and instructions! We strive to have all our bug documentation be this clean.

Unfortunately, I haven’t seen this one before. I’ve created an issue in our repo referencing this thread and your instructions:

We’ll be sure to keep you updated when we get a chance to look into this. I’ll try and think of a workaround.


  • Rachel

Hi Hari,

The issue with removing the entity has been fixed and will be included in the Cesium 1.42 release available on March 1st. Thanks for reporting this!