Viewing historical (and future) information is something that’s been on our to-do list since the beginning. We actually had a prototype at one point, but that code was incomplete and has not been ported to the new Viewer yet. It was also a hack, so we’re better off starting from scratch.
If I’m understanding you correctly, there are three seperate features you would like to see implemented.
Path Visualization - For dynamicObject.position, create a historical (and future) path showing where the object has been and where it is going.
Waypoint Visualization - For other visualizer types, such as billboard, show the past (and future) billboards which represent where we had actual (non-interpolated) data for.
Timeline Interval - Extend the Timeline widget to manipulate an interval which will constrain all visualization to that time so that past and future data does not extend past that interval.
I think all three of these are great ideas and definitely on the roadmap. To keep things clean, they should each be implemented independently and merged into master one at a time. I’ll go into more detail below about how I see each feature being implemented. I’ll put all of this up on the wiki as well.
Create a new visualizer, PathVisualizer, rather than modify the existing visualizer. This visualization will use the dynamicObject.position property to draw the path the position makes over time. We will need a new CZML property, “path” for defining the graphical properties of the Polyline it creates, which will most likely mirror our current polyline options, plus have three new properties to determine how much of the path is visualized.
- leadTime (number) - How many seconds ahead of the current time to show the path for.
- trailTime (number) - How many seconds behind the current time to show the path for.
- intervals (ISO8601 interval array) - One or more intervals where the the path is shown for the duration of that interval as long as the current time is in or on the interval.
Like PathVisualizer, we are probably better off creating a new visualizer for each type which shows historical information, rather than modiy existing types. For example billboards could have WaypointBillboardVisualizer or something similar. I could be convinced otherwise, but I think the first step would be to implement it separately and only merge them together if it can be done cleanly and without affecting performance. It’s important to keep in mind that when visualizing waypoints, we want to visualize how that looked at that time, and not how they look now. I think adding transparency to hem is a good idea as well. We’ll most likely want a way to define how this works in CZML as well (similar to the above Paths), but I need to think about it some more.
This is probably the easiest to implement and just involves allowing the tick on the Timeline to be split into two so that the desired start/end times can be manipulated. Rather than modify the actual start/end times on the clock itself, this will just create a new constraint managed by the timeline. It should also be easy to go back to the full data interval. Additionally, we would want to add a constrainedInterval property to all of the Visualizers (and VisualizerCollection) which lets the visualizer know the constrained time for which it should provide visualization. This will allow the historical visualizers to know not draw data outside of the desired times.
Obviously, these are just ideas at this point. I’ve been really busy on Core cleanup, so thanks for the catalyst to get me to write this stuff down. If anything I’ve said sounds different than what you actually intended, just let me know and we can figure out a design that fits everyone’s requirements.