# Removing a portion of a czml entity

**URL:** <https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338>\
**Category:** CesiumJS\
**Created:** [February 15, 2022, 9:35pm UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338 "2022-02-15T21:35:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/david/32/3484_2.png) [@david](https://community.cesium.com/u/david)\
**Post date:** [February 15, 2022, 9:35pm UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338/1 "2022-02-15T21:35:37Z")

</div>

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…

```auto
{
   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.

Thoughts?

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

---

<div class="post-metadata">

**Author:** ![Jacky](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jacky/32/7686_2.png) [@Jacky](https://community.cesium.com/u/Jacky)\
**Post date:** [February 15, 2022, 10:26pm UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338/2 "2022-02-15T22:26:56Z")

</div>

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

- Regards,

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/david/32/3484_2.png) [@david](https://community.cesium.com/u/david)\
**Post date:** [February 15, 2022, 10:47pm UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338/3 "2022-02-15T22:47:35Z")

</div>

Sandcastle says no 🙂

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.

> **[Cesium Sandcastle](https://sandcastle.cesium.com/#c=fVVrc6o4GP4rGb/Uzlgu3vWos4qXo1V7vLb12NkJECA1BAxBas/0v29AS+22u3wI5HkvefLeMDwacGC8ugQ0we8tBeBPvACAzTrYZkzPCF1E+TaTO8EUuigWdGCADaBtJmOgY0J0DzITQGoCAnVEUvUDYgH2aGyhSsoZfst9OSfwXHQTUrwP0Q02v5zWHgxTzESBwbDPY7cnBAiNht9qQOAwZDWvHM79uixHUSRBG0uG514BDpmNePPqb51AurtqtSkkR44NSMCAQd/BRpADQ2pIDRm2QFYceA0sL6QmMoGGAhy6QuK3UhbppevvFxFXcaGNUk4xKxNyWE9g2af2Dx0GqFzM4XXnbh4ptwPba4tnulg5vZUtvjrxtj3T2o/x26rKNSdBHqaLuTJss6BolGcxMKezlSq0tZfn6FB9nK1icGT0nI0RtdvdYCK2lW7bMA/7QWygHRareWfddX6xTXfeNSZ2t72qDfZThQxf8XNUXqz00ehor9B0Zi/2yB8tjz8HNXW8XvtR17ReJoVlbbkgau9hc+hGGBcrqoUPt5WC0en3Z9PlUjbzt97AtwZ3/mK4c1a+vZq87Gvdfi+4PxSHDw45atTp9OnG6Pd64eNexysyje7tydJkm8JIn/W93npQKjCz+soHNfhrNKGd1cyS130GOyN0T8cLZW4967fH8ahd7e+WpQB1HxfqLDoeqlzpyCUtv3F/5mW0HEynHXviJrHrkf5ytwhnrqalyQMgEIkXlaVKpTP0dn4n5XuRU0vkWfOIxy4wAJitwzr4nS+VcuDT8pSe8JZ+WR7lSQPkfQ7GoYFNCDTRdh5BF4wcj+FXoQnJHcM2Tlpm3OsvL1R8/ILInWUFiH9iY0DGRYlCmhecqjmgfMci4EeS9FJ/OB5fOOXohf+7xYS240UdaOxsFvdAHXAWolSop4L/jIyq5nOgWsuBUkXERfmG0fvb9wKc9PKHl/Q+9dNEOj1qXi0XyqpUVGrlmqg/tZL7EN4UK4VyvlSQ1EqpUMyXVPVCWFSqar5ckYrVcqlcrii1Yip8+sQmXp9+bOmWGslYPGAUISYGI0XR+xRYJ1h2mzGSvRanDFPEtplrYXmykOK+X3ghEzoSNM3s2VYTY7abiiTiQTMbj97ra4k7iGaDBAfN1ikWIs9L7CIv5NnsdbN1js9JSfKZJ7wH2Y/p83+DNC3seKJZgq95vndMOr44KCmKEm8SJJPLNJKCab2b/4Vd32MchIxkJUnmyPUJFFmS9dDYIS4ZQXByBUBDvjRtmPgguDW/CRgwCAwCIbFCQhb4VbRDqyEL/S+mcaQwte/E74TAY6zmqK3xCZQkMZnF9ntL7nlEh+zC80njHw)**
>
> The Cesium Sandcastle provides an interactive environment for testing Cesium code.

---

<div class="post-metadata">

**Author:** ![Jacky](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jacky/32/7686_2.png) [@Jacky](https://community.cesium.com/u/Jacky)\
**Post date:** [February 16, 2022, 7:20am UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338/4 "2022-02-16T07:20:05Z")

</div>

You need to set label as undefined inside the source entities.  
[Sandcastle](https://sandcastle.cesium.com/#c=dVVrc6o4GP4rGb/UzlguKt6OOqt4OVq1RxHbeuzsBAiQGgJCkNqd/vcN2HLstuuHhDzvJU/em6ZPIwbMV4+ADvi9owD8ky4AYKsFdgXLN2MPUbYrlM4whR5KBX0YYROo2/kMGJgQw4ehBSC1AIEGIrn6EYUR9mlqIQvSO/xW+nJP5HvoJqb4EKMbbH25rTee5JiFIjPEAUvdnhHANdpBtw2BGyK7c+UyFrREMUkSATpYMH3vCjAYOoh1rv42CKT7q26PQnJi2IQEjEMYuNiMSmBCTaEtwi4o8guvge3H1EIWU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

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/david/32/3484_2.png) [@david](https://community.cesium.com/u/david)\
**Post date:** [February 16, 2022, 1:05pm UTC](https://community.cesium.com/t/removing-a-portion-of-a-czml-entity/17338/5 "2022-02-16T13:05:07Z")

</div>

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.
