# How to let czml packet to dispaly an object track in real time?

**URL:** <https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934>\
**Category:** CesiumJS\
**Created:** [January 15, 2014, 3:54pm UTC](https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934 "2014-01-15T15:54:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![researcher\_pim](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@researcher\_pim](https://community.cesium.com/u/researcher_pim)\
**Post date:** [January 15, 2014, 3:54pm UTC](https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934/1 "2014-01-15T15:54:04Z")

</div>

Hi, All,  
I'm going to display a car's track in real time. The car is moving and send back it's gps data. I want to display the car's track on Cesium. There are two issues.

1. I choose "range":"UNBOUNDED". Because "LOOP\_STOP" always go back to the start point after ending. When clock crosses the end time, there is an exception throw out. Say,

DeveloperError: This object was destroyed, i.e., destroy() was called.  
Error  
&nbsp;&nbsp;&nbsp;&nbsp;at new DeveloperError ([http://192.168.1.105:8080/Source/Core/DeveloperError.js:37:17](http://192.168.1.105:8080/Source/Core/DeveloperError.js:37:17))  
&nbsp;&nbsp;&nbsp;&nbsp;at throwOnDestroyed ([http://192.168.1.105:8080/Source/Core/destroyObject.js:44:19](http://192.168.1.105:8080/Source/Core/destroyObject.js:44:19))  
&nbsp;&nbsp;&nbsp;&nbsp;at CompositePrimitive.update ([http://192.168.1.105:8080/Source/Scene/CompositePrimitive.js:410:27](http://192.168.1.105:8080/Source/Scene/CompositePrimitive.js:410:27))  
&nbsp;&nbsp;&nbsp;&nbsp;at updatePrimitives ([http://192.168.1.105:8080/Source/Scene/Scene.js:828:27](http://192.168.1.105:8080/Source/Scene/Scene.js:828:27))  
&nbsp;&nbsp;&nbsp;&nbsp;at Scene.render ([http://192.168.1.105:8080/Source/Scene/Scene.js:886:9](http://192.168.1.105:8080/Source/Scene/Scene.js:886:9))  
&nbsp;&nbsp;&nbsp;&nbsp;at CesiumWidget.render ([http://192.168.1.105:8080/Source/Widgets/CesiumWidget/CesiumWidget.js:537:25](http://192.168.1.105:8080/Source/Widgets/CesiumWidget/CesiumWidget.js:537:25))  
&nbsp;&nbsp;&nbsp;&nbsp;at Viewer.render ([http://192.168.1.105:8080/Source/Widgets/Viewer/Viewer.js:701:28](http://192.168.1.105:8080/Source/Widgets/Viewer/Viewer.js:701:28))  
&nbsp;&nbsp;&nbsp;&nbsp;at render ([http://192.168.1.105:8080/Source/Widgets/Viewer/Viewer.js:69:28](http://192.168.1.105:8080/Source/Widgets/Viewer/Viewer.js:69:28))

How to solve this exception?

2. I don't want to display the track ahead of my car. It's a real-time tracking system. So I cannot get "real" current position of the car, by the speed limit of light and network traffic delay. To fill this gap, I set the end time of every czml packet 30 second ahead of real time. Then there is always a 30 seconds line ahead of my car. How to remove such redundant line and let my model at the very head of the line.

Thanks,  
Shawn

---

<div class="post-metadata">

**Author:** ![Stephanie\_Stites](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Stephanie\_Stites](https://community.cesium.com/u/Stephanie_Stites)\
**Post date:** [May 14, 2014, 7:11pm UTC](https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934/2 "2014-05-14T19:11:36Z")

</div>

Hi Shawn,  
&nbsp;&nbsp;&nbsp;I was wondering if you ever got this working? Were you ever able to find any examples of how to do this? I am looking at doing something similar and am having a hard time finding any examples of how to accomplish it. Thanks.

Stephanie

---

<div class="post-metadata">

**Author:** ![lgsoftwares](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@lgsoftwares](https://community.cesium.com/u/lgsoftwares)\
**Post date:** [December 15, 2015, 2:57am UTC](https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934/3 "2015-12-15T02:57:30Z")

</div>

Hi Shawn,

My project is like yours can you please share some examples.

I have to show flight data as they are flying in real time without reloading page. Multiple flights at a time.

If any one have done something similar please let me know with example.

Thanks  
lg

---

<div class="post-metadata">

**Author:** ![mcslindh](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@mcslindh](https://community.cesium.com/u/mcslindh)\
**Post date:** [June 3, 2016, 8:37am UTC](https://community.cesium.com/t/how-to-let-czml-packet-to-dispaly-an-object-track-in-real-time/934/4 "2016-06-03T08:37:54Z")

</div>

Hi. Did you ever find any good examples of how to do this? I'm currently working on a project to display realtime flight trajectories but can't find any good examples how to deal with reltime datasource. I have used google maps before with periodic update interval to fetch new data (2d representation) but can't find any good examples in cesium.
