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

Bill Thoen bthoen at gisnet.com
Fri Mar 20 18:32:24 EDT 2009


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



More information about the Users mailing list