Entity Path not disappearing when entity is not available.

1. A concise explanation of the problem you’re experiencing.

I’ve configured an Entity with a path that I want to only show based on my Availability settings that I’ve set.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Here is a Sandcastle example. What I’ve done is added a second before and after in the Viewer relative to the actual availability settings. You will notice that the Point and Model items disappear but the Path does not.

I was able to fix this by simply adding:

entity.isAvailable(time)

to the list of conditionals inside of PathVisualizer.js on line 290. I don’t know what Cesium’s vision is for this but for my needs I need the path to disappear when the entity isn’t available.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

If I have multiple Entity’s on the screen with their paths overlapping with time, I only want to show the paths that are currently active.

4. The Cesium version you’re using, your operating system and browser.

Cesium 1.58, Win10, Chrome v75.0.3770.142

Thanks for the Sandcastle example and the suggested fix! The closest issue I’ve found is this:

https://github.com/AnalyticalGraphicsInc/cesium/issues/1704

But it’s talking more about when availability data isn’t strictly available. I think in this case the correct behavior would be to have the path disappear if the Entity is not shown. I wonder if a cleaner approach would be to have the entity return that isShowing is false when isAvailable is false. I posted this question in that GitHub issue, feel free to follow up there. Making this contribution to CesiumJS once we have consensus would be absolutely appreciated!

Thanks for raising awareness of this in an actual issue. Good to hear I’m not alone in my thinking.

-Brad