<br><br>On Saturday, January 21, 2012, vrbikdan <<a href="mailto:vrbikdan@gmail.com">vrbikdan@gmail.com</a>> wrote:<br>> Hi,<br>> I'm trying to set min and max scale for layer. I used this part of code:<br>
><br>> kontiky_layer = new OpenLayers.Layer.GML("GML",<br>> "kontikyVrstva/kontikyFinalGML.gml", {projection: map.displayProjection,<br>> styleMap: styleKontiky},{minScale: 60000, maxScale: 10000})<br>
><br>> But unfortunately layer is still visible in all scales.<br><br>What if you set minScale and maxScale in the same object as where projection and styleMap are set?<br><br>Note: Layer.GML is deprecated, you should use a Vector layet configured with a Fixed strategy and an HTTP protocol. Look at the OpenLayers example.<br>
<br> Cheers,<br><br>-- <br>Eric Lemoine<br><br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel : 00 33 4 79 44 44 96<br>Mail : <a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com">http://www.camptocamp.com</a><br><br>