[OpenLayers-Users] on window size change - zoom the map instead of enlarging the extent

Adrian Popa adrian_gh.popa at romtelecom.ro
Wed Dec 2 05:10:08 EST 2009


Hello everyone,

I would like to change the behavior of OpenLayers like this:

Now, when the user resizes the browser window, the map  remains centered 
on the previous view, the zoom remains the same, and the edges of the 
map are downloaded.

I would like on window resize, to keep the current view in the visible 
part on the map and just do a zoom to extent (for my current extent). 
The change should thus be in the zoom used.

I want to know if this is possible (and if I can change a 
on-window-resize handler action), or if I need to build some ugly hack 
around it. A pointer to the relevant documentation or an example is 
highly appreciated.

Thanks,

-- 
--- 
Adrian Popa
NOC Division
Network Engineer
Divizia Centrul National de Operare Retea
Departament Transport IP & Metro
Compartiment IP Core & Backbone
Phone: +40 21 400 3099




More information about the Users mailing list