opengeo/gxp — Issue #88: make timeline slider change the time range
Author: tschaub
Created: 2011-10-17 04:32:25+00:00
State: open

The timeline should be able to determine the time domain of all layers with a time dimension from the playback tool (see #87). Since we will likely swamp the browser if we request all features for all layers with a time dimension, we want instead to request only a subset of the features for each layer. This subset should be based on both the map extent (already implemented) and some fraction of the overall time domain. The purpose of the slider is to control this fraction.

We could start by assuming a linear relationship will work well (it may be that we want to have the fraction scale logarithmically instead). So, for example, if the time domain of all layers with a time dimension is 100 years, we might want to start the slider at 0.25, and the timeline would show 25 years of events. In this case, when the user slides the slider up to 0.5, the timeline would show 50 years.

As with the spatial extent, it makes sense to request some buffer around the time extent shown on the slider. Without this buffer, new features would be requested for every movement of the timeline. We'll have to play with the numbers to see what is reasonable (given whatever data we are using), but we could start by requesting data in a time buffer that extends 50% in each direction. So, if the timeline is displaying 50 years of data between 1900 and 1950, we would request data between 1875 and 1975.

If the user is not moving the map, but only moving the timeline, we should really only be requesting data in a time range that we don't already have. And we should be removing existing events that fall outside of some buffer around the currently displayed timeline. These optimizations can come later.