[OpenLayers-Users] catching zooming events

Christopher Schmidt crschmidt at metacarta.com
Wed Feb 17 08:06:03 EST 2010


On Wed, Feb 17, 2010 at 12:03:39PM +0200, Ahti Lahtela wrote:
> Hi,
> 
> I'm new with OpenLayers and I have working example which contains WMS-layer.
> 
> Now I want to catch zooming events (control ZoomPanel) and change the 
> layers -parameter in WMS request. The goal is to load suitable layer 
> from WMS-MapServer depending the new zoom level.

I would highly recommend just doing this on the server instead, using
minscale/maxscale. THe way you would do it in OpenLayers if you wanted
to was to set a fake base layer (or set the allOverlays option in the map
to true), and then set the minScale/maxScale options on your layer
options.

-- Chris

> I didn't find suitable examples, so can someone help me how to:
> - catch ZoomPanel events
> - change the layer parameter of the WMS -request before sending the 
> request after changing zoom level.
> 
> Thanks in advance
> 
> al
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list