Hi,
I have wrote my code in the Sandcastle and this isn't working. Here is the code I used :
var czml = [
{
"id" : "document",
"name" : "name",
"version" : "1.0"
},
{
"id" : "",
"name" : "",
"availability" : "2014-05-10T14:00:00Z/2014-05-10T15:00:00Z",
"polygon" : {
"positions" : [
{
"cartographicDegrees" : [
-50, 20, 0,
-50, 40, 0,
-40, 40, 0,
-40, 20, 0
]
}
],
"material" : {
"solidColor" : {
"color" : [{
"rgba" : [255,255,255,255]
}]
}
}
},
"show" : [
{ // I just tried stuff here, even if it's dirty
"interval" : "1800-01-01T00:00:00Z/2014-05-10T14:00:00Z",
"boolean" : false
},
{
"interval" : "2014-05-10T14:00:00Z/2014-05-10T15:00:00Z",
"boolean" : true
},
{
"interval" : "2014-05-10T15:00:00Z/2999-12-31T23:59:59Z",
"boolean" : false
}
]
}
];
var viewer = new Cesium.Viewer('cesiumContainer', {timeline: false});
var ds = new Cesium.CzmlDataSource();
viewer.dataSources.add(ds.process(czml));
viewer.clock.multiplier = 0;
viewer.clock.clockStep = Cesium.ClockStep.TICK_DEPENDENT;
viewer.clock.clockRange = Cesium.ClockRange.CLAMPED;
var date = new Date();
date.setUTCFullYear(2014);
date.setUTCMonth(4);
date.setUTCDate(10);
date.setUTCHours(16);
date.setUTCMinutes(0);
console.log(date.toUTCString());
setTimeout(function(){
viewer.clock.currentTime = Cesium.JulianDate.fromDate(date);
console.log('---- Time Set ----');
},3000);
I obviously did something wrong. Do you know what it is ?
Thanks
Raphael