Hi, I use minScale and maxScale for WMS layers, but my scales more like 6643704 (EPSG:4326, EPSG:32627) to display whole Spain. Perhaps you have to set max and minResolution. Arnd _____
Von: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] Im Auftrag von toni hernández Gesendet: Donnerstag, 16. April 2009 12:51 An: Bill Thoen Cc: users@openlayers.org Betreff: Re: [OpenLayers-Users] minScale maxScale on layer hi, thanks for the answer. I saw the examples and It looks like minScale and maxScale refer either to the map object or third part layers. I tried this code (and several more) on a WMS Layer without any luck. I mean the layer is always visible. Also, when I execute getScale the values are quite understandable. (like 107 for the whole territory of spain!!!!). var catastreLayer = new OpenLayers.Layer.WMS( "Cadastre", "http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx", {layers: 'Catastro', transparent: "true", format: "image/png"},{tileSize: new OpenLayers.Size(512,512), singleTile:true, buffer: 0,minScale: 1/100,maxScale: 1/400} ); map.addLayer([catastreLayer]); 2009/4/15 Bill Thoen <bth...@gisnet.com> There's a good description on that subject right here: http://trac.openlayers.org/wiki/SettingZoomLevels - Bill Thoen toni hernández wrote: 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.
_______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users