When double-clicking on an OpenLayers map, the screen is momentarily blank while the next zoom level draws.

Is this avoidable? It's not ideal, given that many other mapping APIs show a smooth zooming effect.


You will have to change the layer transitionEffect to 'resize'. According to OpenLayers documentation:


{String} The transition effect to use when the map is panned or zoomed.

There are currently two supported values

  • null

    No transition effect (the default).

  • resize

    Existing tiles are resized on zoom to provide a visual effect of the zoom having taken place immediately. As the new tiles become available, they are drawn over top of the resized tiles.


  • Thanks. It's not quite as smooth as some of the other APIs but this is a definite improvement. Dec 9 '11 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.