I used websocket to receive real-time data and pick sub-rocket data emitted by rate of 1 frame/100ms to draw on the globe. I just plotted point when data received at once. I knew it was not wise. But I just want to test performance. Below is my code:
this.ws = new Websocket(‘ws://localhost:8081);
var that = this;
this.ws.addEventListener(‘message’,function(event){
var receiv = new Map(JASON.parse(event.data));
that.entities.add({
position: Cartesian3.fromDegrees(receiv.get(“longitude”),receiv.get(“latitude”)),
point:{
pixelsize:5,
color:that._color.GREEN,
height:0}});
});
When I ran the code above, it did show point dynamicly. But after a while it totally stopped updating. Only if I used mouse to manipulate globe or zoom it in or out it would continue plotting point data received.
I wonder why. Does it have something to do with performance? Is it my resolution is wrong?