[Polylines] Problem when removing multiple polyline with material properties

Hi !

I’m having an issue, detailed here:


This is not my post, but i have the same issue.

**When i try to remove multiple polylines (actually, entities containing polyline and wall) within a for loop, some polyline doesn’t remove. **

Some of the polylines are still displayed, but NOT the wall.

The problem occurs only when the polyline material is dash or outline material.

If i use only Cesium.COLOR it works fine !

I use Cesium 1.37, chrome lastest version.

I’ll try Cesium 1.38 to see if the bug is still here, and update you.

Thanks for looking a this !

Love you work !

Hi Benjamin,

I was able to duplicate this bug in the Polylines Sandcastle example by adding the following loop to remove the polylines:

Sandcastle.addToolbarButton(‘Remove polylines’, function() {

for (var i = 0; i < viewer.entities.values.length; ++i) {




If I hit that button, not all of the polylines are removed, but if I do it several times, they will be eventually removed.

I opened Issue #5893 to track this, please add any additional info there if you have any.



Try this loop to remove them correctly:

Sandcastle.addToolbarButton('Remove polylines', function() {
    while (viewer.entities.values.length > 0) {