How to hide/remove (multiple) entities?

2,604 views
Skip to first unread message

Alexander Entin

unread,
Feb 6, 2015, 6:01:44 AM2/6/15
to cesiu...@googlegroups.com
1. There is "show" on graphic properties, but not on the entity itself. How to show/hide the whole entity? Enumerate and hide graphic props? Change availability?

2. Tried to assign a parent and show/hide it trough availability to no avail. What is a recommended way to show/hide multiple entities? What is parent for?

3. What about changing viewer.entities to CompositeEntityCollection and then adding/removing EntityCollections to show/hide stuff?

4. What about CZML? Should I split stuff among DataSourses and add/remove them?

5. Can this be done regardless of entity source?

6. Is there a way to remove an entity through CZML?

Thank you

Matthew Amato

unread,
Feb 10, 2015, 1:39:26 PM2/10/15
to cesiu...@googlegroups.com
1. We're aware of this deficiency and will be added very soon, probably in the next release on March 2nd.  A possible workaround would be to assign an empty TimeIntervalCollection instances to entity.availability.

2. Right now the parent is simply for bookkeeping to enable UI devleopment, however in the next release we also plan on having child entities visibility tied to the parent as well.

3/4/5. The best answer here is to just wait for 1 & 2 to be done.  You could add multiple DataSources, but removing/re-adding them is a much heavier operation that toggling the visibility on and off.

6. there is a `delete` packet.  I think the below syntax is the correct:

{
  id : 'entityID'
  delete : true
}.

Hope that helps and thanks for the feedback.



--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

tho...@gmail.com

unread,
Mar 11, 2015, 1:15:48 PM3/11/15
to cesiu...@googlegroups.com
Thank you, Matthew for your great reply. Did the show/hide on the entire Entity make it into the March 2nd release? Looking at the docs, I don't think so. What's the update? I can write a work-around, but would rather wait and put attention elsewhere. Thanks!

Matthew Amato

unread,
Mar 15, 2015, 10:45:19 PM3/15/15
to cesiu...@googlegroups.com
Unfortunately this didn't go into March 2nd, but I really want to get it into the April 1st release, I'll try to remember to update this thread when it goes into master.

thin...@gmail.com

unread,
Oct 19, 2015, 10:58:46 AM10/19/15
to cesium-dev
In regards to #6.... For an application that relies purely on CZML messages, is it more efficient to toggle the show flag or send a delete json packet to Cesium? Thank you.
Message has been deleted

leviat...@gmail.com

unread,
Jun 15, 2016, 4:44:17 PM6/15/16
to cesium-dev
Were these issues, especially #3, ever addressed?

Hannah Pinkos

unread,
Jun 16, 2016, 10:28:47 AM6/16/16
to cesium-dev, leviat...@gmail.com

leviat...@gmail.com

unread,
Jun 16, 2016, 12:57:42 PM6/16/16
to cesium-dev, leviat...@gmail.com
Thanks for the reference. I was wondering, however, if it were yet possible to remove a group (of like) of entities from viewer.entities, as opposed to just hiding them.

For instance in the example your posted, how could I remove all and only the boxes? It seems the only way to remove from an EntityCollection like viewer.entities is individually by id. But does there doesn't seem to exist something like viewer.entities.remove(boxes).

Nathan

Hannah Pinkos

unread,
Jun 16, 2016, 5:08:10 PM6/16/16
to cesium-dev, leviat...@gmail.com
Hi Nathan,

Yeah, I think the only way to currently remove multiple entities at once would be to loop through them and remove each one individually.

-Hannah

MP

unread,
Dec 10, 2016, 6:58:02 AM12/10/16
to cesium-dev, leviat...@gmail.com
Hi,

Can properties of entities drawn in CZML be manipulated? I am trying to toggle fill property of a group of polygons at a time. I have added parent property. But it doesn't seem to work. Anyone has faced this issue before? Any help is much appreciated :)

Here is my sample code: 
[  
   {  
      "id":"document",
      "name":"CZML Geometries: Polygon",
      "version":"1.0"
   },
   {  
      "id":"testParent",
      "description":"test parent entity"
   },
   {  
      "id":"id_1",
      "polygon":{  
         "positions":{  
            "cartographicDegrees":[  
               -95,29,0,
               -95,29,0,
               -95,29,0,
               -95,29,0,
               -95,29,0
            ]
         },
         "extrudedHeight":{  
            "number":4
         },
         "height":{  
            "number":0
         },
         "fill":false,
         "parent":"testParent",
         "outline":true
      }
   }
]

Thanks,
MP
Reply all
Reply to author
Forward
0 new messages