Czml vs Entity?

Hello Cesium!

With the new Entity API (very epic), is the CzmlDataSource still viable? Or should we expect an update on the Czml overall?

Secondly, I noticed that Entity can include Billboard, Label, and Rectangle… can Czml include rectangle?

Thanks, Cesium!

Here is the example I am doing. I just need to have a polygon and rectangle included into the Czml. However, I am aware that Entity is capable of doing this… but am unsure if I should switch from CzmlDataSource to pure Entity. Through this CzmlDataSource, I’m importing in 10,000 objects onto the globe at the moment. What would you suggest to do? Stick with the CzmlDataSource, or swap?

[

{

“id”:“document”,

“version”:“1.0”

},

{

“id”:“Vehicle”,

“availability”:“2012-08-04T16:00:00Z/2012-08-04T17:04:54.9962195740191Z”,

“billboard”:{

“eyeOffset”:{

“cartesian”:[

0.0,0.0,0.0

]

},

“horizontalOrigin”:“CENTER”,

“image”:“data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=”,

“pixelOffset”:{

“cartesian2”:[

0.0,0.0

]

},

“scale”:0.8333333333333334,

“show”:[

{

“interval”:“2012-08-04T16:00:00Z/2012-08-04T18:00:00Z”,

“boolean”:true

}

],

“verticalOrigin”:“BOTTOM”

},

“label”:{

“fillColor”:[

{

“interval”:“2012-08-04T16:00:00Z/2012-08-04T18:00:00Z”,

“rgba”:[

255,255,0,255

]

}

],

“font”:“bold 10pt Segoe UI Semibold”,

“horizontalOrigin”:“LEFT”,

“outlineColor”:{

“rgba”:[

0,0,0,255

]

},

“pixelOffset”:{

“cartesian2”:[

10.0,0.0

]

},

“scale”:1.0,

“show”:[

{

“interval”:“2012-08-04T16:00:00Z/2012-08-04T18:00:00Z”,

“boolean”:true

}

],

“style”:“FILL”,

“text”:“Vehicle”,

“verticalOrigin”:“CENTER”

},

“position”:{

“cartographicDegrees”: [-117, 32, 0]

},

“polygon” : {

    "hierarchy" : Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0,

                                                    -115.0, 32.0,

                                                    -107.0, 33.0,

                                                    -102.0, 31.0,

                                                    -102.0, 35.0]),

    "material" : Cesium.Color.RED

}  // Not working

}

];

Hi Katone,

I asked a similar question about CZML a couple months ago here. Right now CZML is lagging a bit behind the Entity api after its overhaul, but it sounds like they’re hoping to bring them back to feature parity soon! There was also a great response from Matthew Amato here, which gives a nice explanation of when to use entities versus CZML. To quickly paraphrase what is said, CZML is the way to go if you control the data generation ahead-of-time and entities are best if you’re creating data within the Cesium application or are getting data from an external source that may not be compatible with a czmlDataSource.

Chris