Custom dataSource example with times and clock?

Hi there

I’ve used the customer dataSource example to build a prototype viewer for my data, but the example in the sandcastle doesn’t use the clock.

How can I enable the clock? I have timestamp data in Unix timestamp format for each of my polyline’s points and would like to be able to fly the camera down the polyline using the clock.

Any pointers would be appreciated.

Thanks

Guy

Perhaps viewer.clock.onTick.addEventListener(function(clock){}); could be of use?

Hi, thanks for the answer, but it’s the initialising of the clock with my timestamp data that is my current concern. Event listeners might be useful once I have one working and want it to do stuff?

I’ll look at the code for the KmlDataSource and see if that helps.

I think the code I am after is here: https://github.com/AnalyticalGraphicsInc/cesium/blob/1.7.1/Source/DataSources/KmlDataSource.js#L1010