Hi
My project updates the position of points from CZML updates sent from a websocket server. This works using the updates and HTML below but I was wondering if it was possible to draw a line between the old and new position of a point. Will I be able to adapt this method to do so or will I need to try something else? Any advice on this or a better way to employ my current method would be helpful.
Thanks
Sam
An Example of the received updates:
[
{
"id":"document",
"name":"foo",
"version":"1.0"
},
{
"id":"0BE1AD40-7057-4EE0",
"name":"unnamed",
"position":{
"cartographicDegrees":[3.8999858,53.053513,0.0]
},
"point":{
"color":{
"rgba":[255.0,255.0,255.0,255.0]
},
"outlineColor":{
"rgba":[255.0,0.0,0.0,255.0]
},
"outlineWidth":4,
"pixelSize":20
}
}
]
client HTML:
<body>
<script>
var viewer = new Cesium.Viewer('cesiumContainer');
var czmlStream = new Cesium.CzmlDataSource();
viewer.dataSources.add(czmlStream);
var ws = new WebSocket("ws://localhost:9292/czml-stream");
ws.onmessage = function(update){
console.log(update.data);
czmlStream.process(JSON.parse(update.data))
}
</script>
</body>