Dynamic data using WebSockets/EventSource example

Hi list,

We just started using Cesium and it looks great.

I was looking for an example of how to use EventSource or even better WebSockets to send dynamic updates of the data to Cesium but I wasn't able to find one.

Does anyone have some pointers or even better a complete example on how to handle dynamic data sending in Cesium?

Greatly appreciated. Thanks.


I just started using Cesium with a websocket approach to dynamically add points to a line.

In the websocket onmessage function, I basically did the following:
var positions = polyline3D.getPositions();

I found that after many points in a single polyline the interaction began to drag and posted a question on this forum here:

The solution (still testing) was to use many polyline collections where the polyline within a collection only has 1024 points. So every 1024 points, I would create a new polyline collection and a new polyline that would be used on the next websocket update.