OpenLayers Blog

All the maps that are fit to blog

Smooth Navigation

March 6th, 2008 by Tim Schaub · No Comments

The upcoming 2.6 release will have a couple of nice visual enhancements for map navigation. The first is a map.panTo method which uses easing methods to slide the map to a new center. The second is layer transitions, which (in their current form) resize existing tiles while waiting for new tiles to load – giving users something to look at while new data comes down. Future layer transitions will include animated zooming with the same sort of easing methods as the smooth panning.

Both enhancements can be seen in the transition example. Smooth panning is enabled by default, use the pan buttons to see the map ease to a new location. The map panMethod options lets you control the type of easing (or turn it off).

The layer transitions are controlled on a layer by layer basis. Open the layer switcher on the above example to see the “resize” transition for single-tile and multi-tile layers (zoom and pan to see the effect).

Thanks to Pierre Giraud (Camptocamp) for leading the easing/smooth panning effort, and thanks to Paul Spencer (DM Solutions) for taking on layer transitions.

Tags: Features