<html><head></head><body 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>-- <br>Bart van den Eijnden<br>OpenGeo - <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><<a href="mailto:eric.lemoine@camptocamp.com">eric.lemoine@camptocamp.com</a>> wrote:<br><blockquote type="cite">On Wed, Apr 11, 2012 at 3:48 PM, Bart van den Eijnden<br></blockquote><blockquote type="cite"><<a href="mailto:bartvde@opengeo.org">bartvde@opengeo.org</a>> 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></body></html>