On Wed, Apr 15, 2009 at 10:19:56PM +0200, toni hernández wrote: > hi, > > Does anyone know if it is possible to set the minscale and maxscale on a > layer so it shows and hides depending on the scale of the map. > > If tried to specify minScale:100, maxScale: 5000 (so the layer appears > between the two scales) on the layer but the layer is still always visible.
Flip them around. maxScale is most zoomed in; the numbers you're using are scaleDenominators. You can specify scale like: minScale: 1/100, maxScale: 1/5000 And see that 1/100 is much larger than 1/5000, and therefore you shoudl switch them. -- Chris > thanks!!! > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users