I had a similar problem and solved it by passing the maxExtent to options of my layers and setting the tileOrigin before switching the layer.<br>It's quite weird, I suppose the problem is that you don't call this method:
<br><br> /** When the layer is added to a map, then we can fetch our origin <br> * (if we don't have one.) <br> * <br> * @param {OpenLayers.Map} map<br> */<br> setMap: function(map) {<br>
OpenLayers.Layer.Grid.prototype.setMap.apply(this, arguments);<br> if (!this.tileOrigin) {<br> this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,<br>
this.map.maxExtent.bottom);<br> } <br> },<br><br>when you switch the layer, and so the tile origin is not updated...but I don't know if this could be the right fix.<br><br><br><br><div>
<span class="gmail_quote">On 10/4/07, <b class="gmail_sendername">Erik Uzureau</b> <<a href="mailto:erik.uzureau@metacarta.com">erik.uzureau@metacarta.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Arnd,<br><br>Thanks for sending this test code... can you explain what we should<br>test for, though?<br><br>ie how do we know if our patch has fixed the problem for you?<br><br>Erik<br><br>On 10/3/07, Arnd Wippermann <
<a href="mailto:arnd.wippermann@web.de">arnd.wippermann@web.de</a>> wrote:<br>> And the file<br>><br>> Mit freundlichen Grüssen<br>><br>> Arnd Wippermann<br>> <a href="http://gis.ibbeck.de/ginfo/">http://gis.ibbeck.de/ginfo/
</a><br>><br>><br>> _______________________________________________<br>> Dev mailing list<br>> <a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br>> <a href="http://openlayers.org/mailman/listinfo/dev">
http://openlayers.org/mailman/listinfo/dev</a><br>><br>><br>><br>_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@openlayers.org">Dev@openlayers.org</a><br><a href="http://openlayers.org/mailman/listinfo/dev">
http://openlayers.org/mailman/listinfo/dev</a><br></blockquote></div><br>