I’d like to group more primitives under an Entity “umbrella” than it is allowed now by a list of Entity properties.
For example, if I wish to have two crossing lines “managed” an entity I expect the following code to work (code is ready for Sandcastle)
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var position = Cesium.Cartesian3.fromDegrees(0,0,0);
Unfortunately only one polyline is visible - the entity native polyline.
The one that was added by custom property doesn’t show.
The question is:
is this an architectural limitation of an Entity layer and each instance on an entity is limited only to one instance of a primitive?
Or may be I miss some code to “activate” added property?
Yes, the Entity API is only designed to have one primitive per type per entity, so you cannot add another polyline onto the entity the way you are trying to in the code example you posted.
Hi Hannah, This is a bit of an old thread, but I’m looking for a way to have the ‘children’ move and rotate along with the parent entity. I tried to do this in the sandcastle: https://sandcastle.cesium.com/index.html?src=Show%20or%20Hide%20Entities.html but that doesn’t seem to work. I can see in the (browser) console that the parent’s position has changed, but the children remain static. Is there a way to have the position of the children be relative to that of the parent entity? Thanks, Mark
update: I see now that the link above doesn’t link to my edited version of the sandcastle. I also saw several posts pointing towards using a CallbackProperty, and I’m currently exploring that.