show/hide PathGraphic of dragged CZML

Hello forum,

I've tried and tried and finally writing forum. Using v 1.4 and Chrome.

I have a user interface wired-up to a list of Entity objects that I have referenced in my code succesfully. Fine. All and good.

I drag some czml onto the map and it successfully displays aircraft flights, along with a path. Here is the czml snippet of question (pay attention to the 'boolean' attribute):
"width":[ { "number":1.0}],

I have a show/hide checkbox for the path of a vehicle moving through time and space. All good so far ... I can de-select the box to hide the path:

<code for deselect>
// this will successfully hide the path = new $wnd.Cesium.ConstantProperty(false);
</code for deselect>

... but when I try to show the path (assuming the path can be shown according to the timeInterval), nothing happens, no exception, just nothing.

<code for select>
// show the path
function show(timeInterval) {
// this pops-up the original iso time string
alert( "iso time: " +timeInterval.toString() );

try { = new Cesium.TimeIntervalCollectionProperty();;
catch(err) {
  alert("Exception on show(). " +err.message);


</code for select>

The original CZML has boolean:true but I don't see where to say that again outside of CZML. This seems to be a question of how to reset the TimeIntervalCollectionProperty object of the PathGraphic .

Wish I could help with the js, but I'm just a high level user at this point using GWT and overlay types to encapsulate the various Cesium types (Entity, PathGraphic, TimeInterval, TimeIntervalCollection, etc ).

Thanks for any help !

Any advise on how the API enables ON/OFF visibility of the path of an Entity ? Thanks

Here’s a simple working example that you can copy and paste into Sandcastle. This assumes a constant always on or off setting.

var gallery = ‘…/…/SampleData/’;

var viewer = new Cesium.Viewer(‘cesiumContainer’);

var czmlDataSource = new Cesium.CzmlDataSource();

czmlDataSource.loadUrl(gallery + ‘simple.czml’);


var showPaths = true;

Sandcastle.addToolbarButton(‘Toggle paths’, function() {

showPaths = !showPaths;

var entities = czmlDataSource.entities.entities;

for(var i = 0, len = entities.length; i < len; i++) {

var entity = entities[i];

if(entity.path) { = new Cesium.ConstantProperty(showPaths);




Thanks, but I already tried that. Using that solution causes the path stay visible even after the Entity times-out. What I need is to re-attach a TimeIntervalCollectionProperty(). The CZML has this boolean:true attribute that I don't understand its equivalent in the js API.

Can you simply keep around the old value and reassign it when you turn them back on. (This assumes you are working with data that isn’t being continually updated).

Something as simple as this should work:

//Turn off

path.oldShow =; = new Cesium.ConstantProperty(false);

then later

//Turn back on = path.oldShow;

path.oldShow = undefined;

D'Oh! That worked. Just say that path.oldShow exists out of the blue. Javascript.

Thanks !