I know that I can use a reference value in czml to link a single property on multiple entities in cesium but, is there an easy way to make it so that, if I have multiple that are all related and I delete one that is considered the “parent” that it would delete children that consider it the parent as well?
Or could I automate that by watching events on the datasource and remove the items that have it as their parent? I also don’t see in the docs, that you can set a parent on an czml entity. Does that exist? I know you can using raw entities, set one as the parent of another but the value is an actual entity. For this, czml would have to receive the parent id as a string and make that association for me.
UPDATE: After digging and testing some stuff, I found several things that may help. So, in czml, I didn’t really see it in the docs anywhere but you can in fact set a parent. It’s just the string id of the other entity that should be the parent. That works. Next, I could add a collectionChanged event listener to the entity collection and watch for when an entity is removed. Another thing I don’t see documented though is that the entity has a _children
prop that’s an array. If an entity is aware of it’s children, shouldn’t removing it auto remove it’s children? Or at least be an option when deleting with czml or deleting an entity, to remove it’s children? That seems like a nice addition.