Loop positions over time with CZML

Hello,

I would like to achieve a functionnality but I cannot figure out how to doit.

In my CesiumJS app, I can add positions with a point and a path. To do this, I click on the map to get the start point, and then I click a second time to get the end point. Then, a CZML entity is created and looks like this :

[
   {
      "id":"document",
      "name":"Example",
      "version":"1.0"
   },
   {
      "id":"5fa210c6-91c3-4ca1-86d8-25bd07fa6cc0",
      "position":{
         "cartographicRadians":[
            0,
            -1.4050302352973831,
            0.6211691711607041,
            5000,
            30,
            -1.404033817600459,
            0.6220235017103034,
            5000
         ],
         "epoch":"2016-05-11T09:11:23.046Z",
         "nextTime":0
      },
      "point":{
         "color":{
            "rgba":[
               60,
               10,
               200,
               255
            ]
         },
         "outlineColor":{
            "rgba":[
               200,
               0,
               20,
               20
            ]
         },
         "pixelSize":15
      },
      "availability":"2016-05-11T09:11:23.046Z/2016-05-11T09:12:23.046Z",
      "path":{
         "color":{
            "rgba":[
               255,
               255,
               255,
               255
            ]
         },
         "outlineColor":{
            "rgba":[
               0,
               0,
               0,
               255
            ]
         },
         "width":3,
         "outlineWidth":2
      }
   }
]

So I compute the "availability" according to the speed of my point. Now, if I add a second entity that have an availability shorter than the first one, then when it reached the end date, the point simply stop moving while the first one have not finished.
When the firrst one have finished its trip, then the two points starts again from the beginning.

What I want to achieve is to loop the second one while the first one have not finished its trip.

Is it possible to do that ?

Thanks, and do no hesitate to tell me if it is not clear.

Hello,

Since the positions are based on time, it is not possible to send the first entity back in time while the second entity continues forward. You could achieve the visualization by adding more points to the first entity to fill up the remaining time of the interval.

Best,

Hannah