Questions:
1 - Possible to have a single entity that has a per position extruded height?
We want to display a set of polygons that represent a specific flight path/tunnel but we need to create a segment for each section since the heights could be different. Is there a way we can display the flight path as a single entity or is the approach shown in the Sandcastle the best way to represent what I want?
CZML has a way to set a per position height
but not a per position extrudedHeight
. We’re displaying 10 flight paths but it ends up being 363 entities to represent all of them completely.
2 - Showing/hiding entities
As you can see the Sandcastle, I am dynamically changing the color of the flight paths whether they are considered active
, inactive
or in the future
. This is not how we want to actually display but is useful for discussion purposes.
We want to have a checkbox for active/inactive/future. If, for example, active is checked, we want to only have the current flight paths that are considered ‘active’ given their properties. If ‘inactive’ is checked, we want to also include any of the inactive flight paths based on the timeline.
The current code is just dynamically setting transparency but this is just a POC and does not seem like the best approach.
I have tried having entity.show
as a CallbackProperty
but that didn’t work (show isn’t a Property
) and it’s possible that also wouldn’t do what I would want to do. The documentation does not say if this is called on every tick or not but maybe it is? I’m definitely not a Cesium expert
I have thought of possibly updating all the entities show
property on each entity by using a listener on viewer.clock.onTick
then depending on which which checkboxes are check it will set show
to true
/false
. Is this a valid approach or is there a better way? I was curious how the SatelliteViewer app did it since they are also doing a similar kind of filtering although in my case I need to do it dynamically based on the current clock time.
Another possibility that occurred to me is to call process
on the CZML datasource with any of the entities affected and update the polygon.show
property to false/true.
There is also the availability/interval properties too that while they were initially helpful for getting an understanding of CZML and creating a POC, they did not seem to fit entirely into my use case since I want to do filtering that is not time dependent.
I’m intending to also to have a mapped list of each flight path and their related entity IDs too although it is probably only a minor optimization
3 - browser/CPU performance
I’ve noticed I need to close and restart my browser to return to stable performance. Is there something I can do so that is not necessary? Any recommendations? I’m using a 2017 Macbook Pro which is probably part of the problem.
4 - possible minor bug?
By pressing play you can eventually see that it will momentarily show a red flight path before it disappears. In the code, it is supposed to be showing a transparent red polygon. The transparency is applied after the fact…?
It also shows a pink flight path which would only happen if time
is undefined – why would time
be undefined
?
While I’ve worked with Cesium for a couple weeks, there still feels like a lot I don’t know so any guidance would be great!
I couldn’t get the Sandcastle working by importing a gist (it said there were too many requests from my IP??)… and when I try to use the share URL it is ‘too long’ by a couple 100,000 characters.
here is a direct link to the gist that you should be able to copy/paste as a sandcastle.