1. A concise explanation of the problem you're experiencing.
I'm adding a Label Collection to my scene, and i want to delete one label from my collection. (by looping)
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
var annotations = viewer.scene.primitives.add(new Cesium.LabelCollection());
function create_notes(type,lng,lat,heightVal) {
newGuid = Cesium.createGuid();
var newlabel = annotations.add({
id : newGuid,
position : Cesium.Cartesian3.fromDegrees(lng,lat,heightVal),
text : document.getElementById("redline_notes").value,
showBackground : true,
font : '14px monospace',
horizontalOrigin : Cesium.HorizontalOrigin.LEFT,
verticalOrigin : Cesium.VerticalOrigin.BOTTOM,
disableDepthTestDistance : Number.POSITIVE_INFINITY
});
created.label.push({"eid" : newGuid,
"eobject" : newlabel});
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to edit/delete the text in the label,
by looping over my created json object.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.52, Win 10, Chrome