Show/Hide dynamic features

Hey guys, I wondered what y'all envisioned for how to show and hide dynamic features. We've used a couple of different methods.

One was to simply add/remove items from the dynamic object collection, which worked, but without modifications to the collection to be able to add/remove the actual processed objects rather than re-processing the raw CZML objects every time, the performance when hiding/showing thousands of objects is very poor. Also, this requires us to keep track of hidden objects without a collection (or in a second collection).

Another thing we did was to implement showing/hiding in all the visualizers, which worked with good performance, but if we're going to do that, we'd like to get on the same page and push a change to y'all (especially because we have to make sure it gets put back in properly every time we rebase).

A third method that turns out to be quite simple in implementation is to implement showing/hiding in the collection itself and overriding getObjects so that the objects appear to be removed from the collection but are actually still captured there and can be shown again via their ids.

I don't know how much thought y'all have given this, but I'd like to be able to contribute whatever we do and I wanted to make sure we were on the same page.

Thanks!
-- David

Hi David,

Thanks for the suggestions. While I’ve been having trouble finding the time to do it, I definitely want to improve the DynamicScene layer (perhaps with major changes) to simplify the process of manipulating client-side data. Being able to set an entire DynamicObject as “hidden” at the Collection layer sounds like a good approach for coarse manipulation. We should certainly allow for a DynamicObject to be removed from the collection completely as well.

The visualizers already use the show property for each object to determine if it should be drawn or not. You can always override the show property on individual elements of each dynamicObject to achieve the same affect. That’s our recommenced approach right now for toggling individual items.

All good ideas and we’re always willing to look at a pull request or simply check out a fork/branch if you want feedback on the code itself. When I finally start working on the DynamicScene refactor, I’ll be sure to email out the dev list for requests and feedback so that we make sure we make as many people happy as we can.

Thanks,

Matt