I am trying to access an Entity defined in a CZML document. I am able to load the CZML and display the trajectory defined within it in the Cesium Viewer. However, when I try to zoom the camera to the object, the object is undefined. Here is the code, the center() function is the key to what I'm trying to do:
var viewer = new Cesium.Viewer("cesiumContainer");
var data = Cesium.CzmlDataSource.load('SampleData/test.czml') viewer.dataSources.add(data);
var trajectories = data.entities.values;
var saturnV = trajectories.getById("SaturnV");
In the above code, at a breakpoint within center(), data.entities is undefined. How do I access an object by its ID so I can zoom the camera to it? Also, I would like to know how to follow the object along its trajectory, like is shown on the cesiumjs.org main example.