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):
<CZML SNIP>
...},
"path":{"material":{"solidColor":{"color":{"rgba":[255,255,100,100]}}},
"width":[ { "number":1.0}],
"show":[{
"interval":"2014-09-03T11:45:10Z/2014-09-03T12:16:24Z","boolean":true}
]
},
...
</CZML SNIP>
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
thisPathGraphic.show = 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 {
thisPathGraphic.show = new Cesium.TimeIntervalCollectionProperty();
this.show.intervals.addInterval(timeInterval);
}
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 !
Tom