Removing a portion of a czml entity

I know that you can programmatically delete/remove a czml entity by processing the { id: ‘’, delete: true } but is there a way to completely remove the existence of a specific property in czml without deleting it?

For instance, say I have an entity similar to…

   id: "some id", 
   name: "some object",
   billboard: {
      show: true,
      image: '...path to image',
   label: {
      text: 'some label text',
      show: true

and now I want to remove the label completely. I know I could set it’s show value to false to hide it, but, the way I’m currently implementing a few things within my application, I look at the entity to determine what kind of properties it has on it in order to provide forms to customize aspects of that entity. I’d kind of like to be able to just remove the label property from the entity instead of just hiding it. The way that cesium processes partial objects and updates them accordingly makes it so that I can’t just omit that key, and I believe that setting it to undefined doesn’t work either because that is equivalent to just omitting it.


Also, I’ve asked this multiple times in the past. Are there any plans to update czml documentation at some point?

Hi @david , you can remove Label by set it to undefined.
entity.label = undefined;

  • Regards,

Sandcastle says no :slight_smile:

That doesn’t make it stop rendering. It’s still there. The sandcastle demo provided is one of the default ones, with added code that, after 5 seconds processes a packet with the label set to undefined. I didn’t check to see if it actually cleared the value but it definitely doesn’t stop the rendering of it.

You need to set label as undefined inside the source entities.

  • Regards
1 Like

Yeah, that does work but… per the original post, what I was looking for was a way built in to do it with czml directly and not having to deal with the datasource. I don’t think there is a way to do it. I just wanted to check to see if there is something that I’ve missed in the documentation somewhere. I guess I could just look for something specific in an updater and handle it there, that way it could actually be handled with czml.