[Cesium] Building custom timeline with time span selector

1. A concise explanation of the problem you’re experiencing.

My problem is that I want to implement a custom timeline that would allow the user to “shrink” it in real time and visualize a “slice” of the data

currently loaded in Cesium + Torque. I will upload a gif to give you an example of what I have and what I aim to achieve.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Here’s a gif of what I have right now, the TorqueImageryProvider successfully feeding the data into Cesium, and I can use the timeline to go back and forth and the data will reflect that accordingly

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

And here’s is what I am looking to accomplish. Basically, I want Cesium to display the data between the start and end dates represented by the left and right needles on that custom timeline.

I already have the logic to generate a query to the backend when a mouse down event happens in that timeline (when you drag and drop one of the two needles in the timeline), this will generate a query, save it on torque’s state, make a request for the tile metadata to the backend and return it to the frontend.

I hope this make sense. Let me know if you want to know more details.

4. The Cesium version you’re using, your operating system and browser.

Cesium 1.37. OSx, testing with Chrome at the moment.

Ok, from the TimelineDemo include din Cesium sources, I saw the following

            clock.startTime = startJulian;

           clock.stopTime = endJulian;

           timeline.zoomTo(startJulian, endJulian);

``

So from now I could use that functionality to pick up the dates from the custom timeline needles. I could make those JulianDate objects by

passing it an ISO 8601 formatted date.

Still not sure how to actually refresh the tiles when new data arrives, when picking up a new date range.

Hi there,

TorqueImageryProvider isn’t an official part of Cesium, so I can’t necessarily help there, but if you can contact the creator of the implementation, perhaps they could help.

But you should be able to retrieve the startTime, stopTime, and currentTime from the ClockViewModel in order to make requests.

Thanks,

Gabby

Hey Gabby,

Thanks again! Yeah, I think I got it sorted now, at least partially :slight_smile:

I implemented a timeline with a dynamic time shift (if that’s the right way to call it). I’ll probably post what I done in order to achieve it once I have something more solid.

Cheers!

Awesome, we’d love to see it, thanks!