I've discovered that I need to call some kind of inRange checking function and appropriately toggle display (but not visibility) when a layer goes in to or out of temporal range when doing a dimensional playback in the map.
There is already a temporal layer specific 'calculateInRange' function. Unfortunately, it is only called when zoom or pan has changed enough to cause a layer redraw. However, I would like to toggle the layer(s) display when in / out of dimensional range and ideally trigger a layer change event when the display is toggled.
Basically, I'd like to call this portion of the OpenLayers.Map code:
However, calling map.moveTo at each time tick seems like an expensive procedure (& experiments with Chrome's Profiler function seem to confirm that, as it takes 11 - 24ms per call). On the other hand, it seems like overkill to re-implement those 15 lines of code elsewhere is our code base. The other approach of calling OpenLayers.Layer.moveTo is very fast and modifies the layer display but doesn't trigger any events.
What do you think the best approach would be?
--
Matt Priour
Expert service straight from the developers