The antities in the EntityCollection is not display
// My code like this, it is not work, polyline did not display.
let areaLineCollection = new Cesium.EntityCollection()
let polyline = areaLineCollection.add(new Cesium.Entity({
polyline : {
width: 3,
positions : Cesium.Cartesian3.fromDegreesArrayHeights(temp),
material : Cesium.Color.YELLOW,
depthFailMaterial : Cesium.Color.YELLOW,
show: true
}
}));
viewer.entities.add(areaLineCollection)
// I change my code to this, it works, the polyline display, I do not know why.
let polyline = viewer.entities.add(new Cesium.Entity({
polyline : {
width: 3,
positions : Cesium.Cartesian3.fromDegreesArrayHeights(temp),
material : Cesium.Color.YELLOW,
depthFailMaterial : Cesium.Color.YELLOW,
show: true
}
}));
viewer.entities.add(areaLineCollection)