I have added a czmlDataSource loading data with time bound entities (witch change over time). I want to retrieve a specific entity description property text (witch changes throughout the time line). I wish to display it on the cesium canvas. I want it to be updated like in the infobox.
You’ll need to get the entity from the CzmlDataSource, and then you can get the description using getValue. Here is an example:
var promise = Cesium.CzmlDataSource.load(’/path/to/czml/’);
promise.then(function(dataSource) {
viewer.dataSources.add(dataSource);
var entities = dataSource.entities;
var myEntity = entities.getById(‘myEntityId’);
var description = myEntity.description.getValue(viewer.clock.currentTime);
});
Your code is good enough for getting the description value at current time, but my goal is to diaplay the value on the cesium canvas throughout the timeline, so I need it to be updated automatically, like with the infobox that its value changes when the description of the selected entity changes throughout the timeline. Is there a way to register for getting an event every time the value of the discription changes throughout the timeline?
If so, then it will be easy to use your suggested code and update my element that will be displayed on the canvas.
If there is a solution, may you please give a short example?