I am trying to display an airplane and it’s flight path. I do not want to display the future path, only where it has previously flown. Currently I am able to get the data and move the plane to where it should be, but I am unable to draw the previous path the plane took. I was under the impression that if I added a path element to the czml, the path would be drawn as the packets came in. Here is the current code I am using to display the moving airplane.
czml packet: lon/lat change with each new packet
[{
"id":"Plane",
"model" : {
"gltf" : '../models/Cesium_Air.json',
"scale" : 500.0
},
"path":{
"color":[{"rgba":[255,255,0,255]}],
"outlineWidth":0.0,
"width":[{"number":5.0}],
"show":[{"boolean":false}]
},
"position":{
"interpolationAlgorithm":"LAGRANGE",
"interpolationDegree":1,
"cartographicDegrees":[lon, lat, 100],
}
}]
java script code: processes the czml packets as they are received
var viewer = new Cesium.Viewer('cesiumContainer');
var czmlDataSource = new Cesium.CzmlDataSource();
viewer.dataSources.removeAll();
czmlDataSource.process(modelData, 'model json');
viewer.dataSources.add(czmlDataSource);
I’m wondering if I need to be using a DynamicPath somehow, but am unsure how that would fit in with the czml packet and the 3d model. Any help/examples would be greatly appreciated!