[OpenLayers-Users] How to Set Up Layer Visibility by Scale

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Mar 20 18:43:28 EDT 2009


Hi,

minScale and maxScale should be denominators, so use 100000 and not 0.00001.

Best regards,
Bart

Bill Thoen wrote:
> I'm trying to get a WMS layer to appear only within a specific scale 
> range , and I not having any luck setting minscale and maxscale 
> properties when I load the layer onto the map. For example, I want one 
> layer land parcels to show from 1:1 up to 1:100,000 scale, so I set 
> minscale to 0.00001, expecting that once I zoom out to say, 1:120,000, 
> the land parcel layer should have its visibility property set to false 
> and the layer should be invisible. But it continues to stay visible.
>
> Can somebody tell me what I'm doing wrong? (I'm using OpenLayers 2.7, in 
> case that matters.)
>
> - Bill Thoen
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the Users mailing list