Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

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

transitionEffect

{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.

http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.transitionEffect

share|improve this answer
    
Thanks. It's not quite as smooth as some of the other APIs but this is a definite improvement. –  Stephen Lead Dec 9 '11 at 4:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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