hi,<br><br>it finally works! Just in case someone else needs it. The thing was that I use resolutions to define my map instead of scales. So I needed to use minResolution and maxResolution.<br><br>As easy as that.<br><br>Thanks to all!<br>
<br><br><div class="gmail_quote">2009/4/16 Arnd Wippermann <span dir="ltr"><<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Hi,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">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.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Arnd</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left">
<hr>
</div>
<div dir="ltr" align="left"><font size="2" face="Tahoma"><b>Von:</b>
<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a> [mailto:<a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a>] <b>Im Auftrag
von </b>toni hernández<br><b>Gesendet:</b> Donnerstag, 16. April 2009
12:51<br><b>An:</b> Bill Thoen<br><b>Cc:</b>
<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br><b>Betreff:</b> Re: [OpenLayers-Users] minScale maxScale
on layer<br></font><br></div><div><div></div><div class="h5">
<div></div>hi,<br>thanks for the answer.<br>I saw the examples and It looks like
minScale and maxScale refer either to the map object or third part
layers.<br><br>I tried this code (and several more) on a WMS Layer without any
luck.<br>I mean the layer is always visible.<br><br>Also, when I execute
getScale the values are quite understandable. (like 107 for the whole territory
of spain!!!!).<br><br>var catastreLayer = new
OpenLayers.Layer.WMS(<br>
"Cadastre",<br>
"<a href="http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx" target="_blank">http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx</a>",<br>
{layers: 'Catastro', transparent: "true", format: "image/png"},{tileSize:
new OpenLayers.Size(512,512), singleTile:true, buffer: 0,minScale:
1/100,maxScale: 1/400}<br>
);<br>map.addLayer([catastreLayer]);<br><br>
<div class="gmail_quote">2009/4/15 Bill Thoen <span dir="ltr"><<a href="mailto:bthoen@gisnet.com" target="_blank">bthoen@gisnet.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">There's
a good description on that subject right here:<br><a href="http://trac.openlayers.org/wiki/SettingZoomLevels" target="_blank">http://trac.openlayers.org/wiki/SettingZoomLevels</a><br><font color="#888888"><br>- Bill Thoen</font>
<div>
<div></div>
<div><br><br>toni hernández wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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.<br><br>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.<br></blockquote><br></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>