[OpenLayers-Dev] Towards slick panning and animated zooming
ahocevar at opengeo.org
Sun Dec 23 10:09:18 PST 2012
A big THANK YOU goes to @bartvde for reviewing #810! I also closed
#503 (Animated Zooming). That pull request mixed mouse wheel
improvments, which are now in #812, and animated zooming itself, which
I added as a single commit to #800. Here is the updated list of pull
requests that still need review:
New tile image cache and tile queue improvements. Best reviewed by
someone who has good knowledge of Tile.Image and Layer.Grid
Use GPU where available; animated zooming. Should be easy to review for anyone.
Tween: skip frames when minimum frame rate is not reached. Easy review.
Better mousewheel/touchpad behavior for zooming. Mostly a testing
effort to see how mice or trackpads behave on different platforms.
Again, thanks for any reviews!
On Fri, Dec 21, 2012 at 4:32 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> For those of you who want to test, the live example site also provides
> all examples that OpenLayers ships with, and you can test
> with your own applications. Note that the TileManager is not enabled
> by default. To add it, configure your map with the following option:
> tileManager: new OpenLayers.TileManager()
> The whole source code is available at
> On Fri, Dec 21, 2012 at 12:46 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>> I added another pull request that is used in my mobile-wmts-vienna
>> branch and in the live exymple now:
>> Use transitionend listeners where available. Should be easy to review.
>> On Wed, Dec 19, 2012 at 9:41 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>>> Hey fellow developers,
>>> I don't know if you saw the enthusiastic tweets (e.g.
>>> https://twitter.com/19_norte/status/281134258725199875), but
>>> shows the improvements in tile rendering we can get with four pull
>>> requests. All these pull requests have been thoroughly tested, and are
>>> the result of client work at OpenGeo. To bring these improvements into
>>> master, I am asking for reviews:
>>> New tile image cache and tile queue improvements. This pull request
>>> gets rid of the current tile queue, which I know many people were
>>> unhappy with. It adds a new TileManager class, which delays tile
>>> loading for panning (replacement for previous tileLoadingDelay in
>>> Layer.Grid) and zooming to avoid unnecessary tile image requests. It
>>> also keeps references to image elements, so they can be reused when
>>> the user pans or zooms back to regions or zoom levels that were
>>> already visited.
>>> Use translate3d to enable GPU support where available. This introduces
>>> an applyTransform method on the map, which will use an appropriate
>>> positioning method for the layerContainerDiv. Without any transform3d
>>> styles on the layerContainerDiv, style.left and style.top will be used
>>> just like we currently do, and scale transforms will be used for
>>> scaling. But with a translate3d style on the layerContainerDiv, all
>>> positioning is made with translate3d, and scaling is done with
>>> scale3d. By doing so, the GPU kicks in and brings greatly improved
>>> dragging and pinch-zooming performance.
>>> Animated zooming. This depends on #800, and I will rebase it when #800
>>> is in. For now, it is best to look at the three commits mentioned in
>>> This change includes some improvements to the MouseWheel handler, and
>>> better mousewheel defaults for the Navigation control, to allow for
>>> usable and predictable wheel zooming on touch pads.
>>> Tween: skip frames when minimum frame rate is not reached. We use
>>> requestAnimationFrame for tween already, but we have no control over
>>> the frame rate. This change introduces a new minFrameRate option. When
>>> set, frames will be skipped if the animation gets too slow. The effect
>>> of this can best be seen when zooming with #503 applied in Firefox:
>>> instead of the 20 frames (which work fine in Chrome), about half of
>>> the frames will be skipped because Firefox can not scale the
>>> layerContainer fast enough. The visual effect of animated zooming
>>> still works fine, and users do not have to wait too long for the zoom
>>> to finish.
>>> Thanks for any reviews! With these changes in, the visual appearance
>>> and performance of OpenLayers will be on par with Leaflet.
>>> Andreas Hocevar
>>> OpenGeo - http://opengeo.org/
>>> Expert service straight from the developers.
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Dev