Trying show a polygon in a specific time interval

Hi,

I am trying to show a polygon at a specific time intervals, for this I am setting the sub-property “interval” in “show” of the object to the desired time interval in my czml file. But when I start the animator, an error “show is required” occurs when the slider reaches the end of the specified time interval(see attachment).

Here is the czml part of the polygon:
{
“id”: “water1First”,
“availability”:“2012-08-04T00:00:00Z/2012-08-05T02:00:54.9962195740191Z”,
“polygon”: {
“positions”:{
“referenceFrame” : “FIXED”,
“cartographicDegrees”:[
0,0,55660,
0.5,0,55660,
0.5,5,55660,
0,5,55660,
0,0,55660

          ]
        },
        "material":{
          "solidColor":{
            "color":{
              "rgba":[
                0,0,255,255
              ]
            }
          }
        },
        "outline":[
          {
            "boolean" : true
          }
        ],
        "perPositionHeight":[
           {
                "boolean":true
           }
        ],
        "show":[
          {
             "interval" : "2012-08-04T00:00:00Z/2012-08-04T02:00:54.9962195740191Z",
             "boolean" : true
          }
        ]
    }
}  

Any clues on why this error is coming, and how can I fix this?

Thanks,

I just figured it out. Just need to specify the time interval in the “availability” of the object.

Thanks,

Can you post your working czml snippet? We will be needing the same functionality.

The main problem with your original CZML is that your show property does not completely cover the availability interval and ends up being undefined, which is exposing a minor bug in Cesium. Your CZML file should not cause Cesium to generate an error, but it would have the side effect of your object being visible when show is undefined.

As you discovered, for your specific use case, you can get rid of the show interval altogether and simply use availability. This is actually slightly more efficient if you want to turn on/off the entire object.

Hi Matthew,

That was preciously the problem that I was facing. Thanks for addressing it.

@Ashley, PFA the simple czml file showing two polygons over two overlapping time intervals making use of availability. There are good examples for czml files in the Apps/SampleData folder of cesium as well.

Thanks and regards,

Vishal Tiwari

sample5.czml (1.15 KB)