<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ofcourse this is not a solution either, since the layer will not automatically turn on again, and it will be unchecked in a layer manager.<div><br></div><div>Best regards,</div><div>Bart</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>--&nbsp;<br>Bart van den Eijnden<br>OpenGeo -&nbsp;<a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br><div><div>On Apr 12, 2012, at 9:31 AM, Bart van den Eijnden wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Eric,</div><div><br></div>the displacement issue was caused by calling display on the layer.<div><br></div><div>If I use setVisibility all is fine.</div><div><br></div><div>layer.setVisibility(layer.calculateInRange());</div><div><br></div><div>I'll open up a ticket for the alwaysInRange issue.</div><div><br></div><div>Best regards,</div><div>Bart<br><div><br><div apple-content-edited="true">
<div>--&nbsp;<br>Bart van den Eijnden<br>OpenGeo -&nbsp;<a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On Apr 11, 2012, at 7:43 PM, Bart van den Eijnden wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Just tested, using map.setCenter() does not work.<div><br></div><div>I guess it's because the code block is protected by zoomChanged and centerChanged, and none of them changed in this case.</div><div><br></div><div><a href="https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Map.js#L1934">https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Map.js#L1934</a></div><div><br></div><div>Would it not make sense to move this logic (visibility based on range) from the Map into the Layer? Ofcourse I am unaware of the history of all this.</div><div><br></div><div>I'll work on creating a minimal example to illustrate the issues first thing tomorrow morning.</div><div><br></div><div>Best regards,</div><div>Bart</div><div><br><div apple-content-edited="true">
<div>--&nbsp;<br>Bart van den Eijnden<br>OpenGeo -&nbsp;<a href="http://opengeo.org/">http://opengeo.org</a><br>Expert service straight from the developers.</div><div><br></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On Apr 11, 2012, at 6:37 PM, Eric Lemoine wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Wed, Apr 11, 2012 at 4:26 PM, Eric Lemoine<br>&lt;<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>&gt; wrote:<br><blockquote type="cite">On Wed, Apr 11, 2012 at 3:48 PM, Bart van den Eijnden<br></blockquote><blockquote type="cite">&lt;<a href="mailto:bartvde@opengeo.org">bartvde@opengeo.org</a>&gt; wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Hey Eric,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">right, what I am doing now is calling display in the following way:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">layer.display(layer.calculateInRange());<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">but it feels a bit weird to do it this way.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Yes, that's ugly. We really provide a better way to handle your case.<br></blockquote><br>Another thing you could try is call map.setCenter() (with no<br>argument), this should turn off your out-of-range overlays.<br><br>Regarding the displacement issue I'm interested to exactly know how to<br>reproduce it.<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></div></blockquote></div><br></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></body></html>