<br><br>On Wednesday, April 11, 2012, Bart van den Eijnden  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hey,<div><br></div>
<div>I am trying to set the minScale or maxScale of a layer using addOptions after it has been added to the map and drawn.</div><div><br></div><div>However, with the current code of initResolutions, alwaysInRange is not updated unless it&#39;s null [1], which is preventing my options to have any effect.</div>
<div><br></div><div>Is this to be expected?</div></div></blockquote><div><br></div><div><br></div><div>I don&#39;t think so. It sounds like a bug to me.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><br></div><div>[1] <a href="https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L861" target="_blank">https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L861</a></div>
</div></blockquote><div><br></div><div><br></div><div>We may want to change this test to `if (this.options.alwaysInRange === null)`.<span></span></div><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>