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.



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: