# Have trouble Real-time plotting sub-rocket track with point

**URL:** https://community.cesium.com/t/have-trouble-real-time-plotting-sub-rocket-track-with-point/8252
**Category:** CesiumJS
**Created:** [May 13, 2019, 3:07am UTC](https://community.cesium.com/t/have-trouble-real-time-plotting-sub-rocket-track-with-point/8252 "2019-05-13T03:07:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zouyi19930207](https://avatars.discourse-cdn.com/v4/letter/z/a183cd/32.png) [@zouyi19930207](https://community.cesium.com/u/zouyi19930207)
#### Post date: [May 13, 2019, 3:07am UTC](https://community.cesium.com/t/have-trouble-real-time-plotting-sub-rocket-track-with-point/8252/1 "2019-05-13T03:07:04Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![omar](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/omar/32/1999_2.png) [@omar](https://community.cesium.com/u/omar)
#### Post date: [June 3, 2019, 5:13pm UTC](https://community.cesium.com/t/have-trouble-real-time-plotting-sub-rocket-track-with-point/8252/2 "2019-06-03T17:13:23Z")

</div>

CesiumJS does support visualizing real time data. The right way to do this is using a CallbackProperty:

[https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Callback%20Property.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Callback%20Property.html)

Here’s another example that has a moving vehicle (and the wheels move with a callback property as well):

[https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Time%20Dynamic%20Wheels.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Time%20Dynamic%20Wheels.html)

These dynamic properties allow you to control interpolation and extrapolation as well, here’s a code example for that:

[https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Interpolation.html](https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Interpolation.html)

Let me know if this helps!
