Timeline and clock not synchronized

Hello,

I have an issue when I import the timeline widget: https://sandcastle.cesium.com/#c=lZFNT8MwDIb/StTLOlFS7cq6CWk7IcQOTJwqoTRxR7Q0mfLRqSD+O25L11XaAXKK7fd97Dg1s6SWcAZLVkTDmWzAyVDRty4X5xHv4o3RnkkNNo8S8pVrQrysQGHmgZRMOcj193yZ6xpxXBl+RFqPpV2Ipb7ojWDNu2AeUNGVKA/WgvZ7BP4SCjhIraU+TGd6CkoyvW298ciheHkJVYEvuCeL5KoDdcCNFm5XblkzTAda/JN69wfqsI0pej9k49kgmCWTvcyXURJlzjcK1u1W2/Moq5OxngSrYkpTD9VJYV+XFoEfwVPuXNu2lWbptTUTsiZSrG58Gq6aOYeVMij1Kj8hjwZTiq5L7xExDHwRTqWjUBkm8Kt2NVjFGpRnH4v1c5+klGYphred3hhVMNtaruo/
If I import the timeline after initializing the viewer, whenever I move the pin on the timeline, the current time won’t be updated.

Thank you in advance!

Have a great day!

Hi Josh,

There are a couple of other steps missing in the code. In order to get the timeline scrub connected to the clock, you’ll have to add an event listener to it: Sandcastle. Please reference the Viewer.js file in the Cesium repo.

What kind of project are you working on? What is your incentive for creating a separate timeline from the Viewer?

1 Like

Hello Dzung,

A big ‘thank you’ to you!
I’m currently working on a project which doesn’t allow me to have an access to the constructor options of the viewer. That’s why! :wink:

Thanks again! Maybe you should add this step in the documentation?

Have a great day!

Glad I could help!

It is not a common approach that our users take, so we have not considered including it in the documentation. This discussion will be a good reference for future similar use cases.

1 Like

Thank you for your answer! :slight_smile: