CZML for realtime

Using a CZML content refreshed every minute for tracking objects in realtime, I have a strange Cesium Viewer result; The “animation” widget is switching by defautl at 3x multiplier speed

All my data (a list of Markers) in my CZML have an “availability” field defined within a five minutes periodincluding the realtime clocktime and available for 5 minutes

I have not defined global “availability” field as the document top section (don’t know if that will be necessary)

Any idea on the way to force Cesioum Viewer to play in the “realtime” mode???

Another question dealing with updating every minutes with fresh data through a new CZML regenerated. I am using the following lines of code but not sure it is the best since all data are first removed and then recreated. Without calling removeAll() I have my objects dupplicated at the new fresh positions even if the ID used are always identical for the same objects

czmlDataSource.loadUrl(‘my CZML URL here’).then(function() {

I am suspecting it could be usefull using another method than add() but don’t kown where I can find the information


In the document object of the czml file you can set the property clock. To make the clock run in real-time set the sub-property “multiplier” to 1 and this should take care of your problem.

Thanks Chris. I am going to explore that way

Another question. I just moved from Cesium-b30 to Cesium-1.1

My sample was loading a remote CZML file. I was starting from CesiumViewer app

Impossible to make it working in version 1.1 :frowning:

Has something changed??? I can’t understand why I can’t see anymore my czml content

I just added few lines in the “Body” section in the “index.html” file in CesiumViewer

Any idea for the reason it doesn’t work in version 1.1?


No problem. I only just started using Cesium on 1.1 so I’m not sure what might have changed, but a couple things immediately come to mind that may be the cause of your problem.

  1. Are you loading more than one czml file? If so loadUrl() will override all previous data when loading, so processUrl() is better if you’re doing more than one file.
  2. Check the syntax when you’re using viewer = new Cesium.Viewer or new Cesium.CzmlDataSource. A lot of the examples I’ve seen in the documentation write it like that, but at least in 1.1 that syntax no long works. Instead you can just use the function like var viewer = new Viewer(‘cesiumContainer’) and so on without the Cesium call.

Also if neither of those work, try loading it in your browser and while using the browser console. I find a lot of times when I messed something up and czmls stopped showing up the source of the error would be thrown in there.

Yep I was trying as you mentioned without Cesium but no success as well. I also saw that different syntaxes are used in the samples. As it is a starting and important point to understand most of the rest and being able to make some test, it is not evident to start. This is often hard to understand some key things and after this seems easier. This issue is hard in Cesium

Thanks for pointing out the “processUrl”. Will be definetely what I will need

I was using the console as well in Firefox but I was not able to see some errors. Again something strange with js. You can do everthing. It is always happy :slight_smile:

Cesium 1.0 introduced some breaking changes to the CZML specification. In particular, the first packet must now be a “document” packet with a “version” : “1.0” field. See for details on that and other CZML changes.

Hi Mark

Sounds to be an excellent reason. I am going to have a look in that direction to generate what is missing

thanks and take care

Hi again Mark

adding the document packet was the solution

{ “id”:“document”, “version”:“1.0” }

This is now working in version 1.1

So let’s continue and thanks a lot for your help