[OpenLayers-Dev] Zoom Problems Switching Baselayers -- HELP!

Erik Uzureau erik.uzureau at metacarta.com
Tue Oct 9 00:23:19 EDT 2007


Gianni,

Hmm. Sounds like you're maybe onto something here. Can you show us
what the patch you made looks like?

I don't know much about the TMS/TileCache layers, but from my
rudimentary understanding, it *does* seem like that tileOrigin
property might want to change based on the baselayer.

Thoughts?

Erik

On 10/5/07, Gianni Barrotta <giannibarrotta at gmail.com> wrote:
> 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.
> It's quite weird, I suppose the problem is that you don't call this method:
>
>    /** When the layer is added to a map, then we can fetch our origin
>      *  (if we don't have one.)
>      *
>      * @param {OpenLayers.Map} map
>      */
>     setMap: function(map) {
>         OpenLayers.Layer.Grid.prototype.setMap.apply(this,
> arguments);
>         if (!this.tileOrigin) {
>             this.tileOrigin = new OpenLayers.LonLat(this.map.maxExtent.left,
>
> this.map.maxExtent.bottom);
>         }
>     },
>
> 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.
>
>
>
>
>  On 10/4/07, Erik Uzureau <erik.uzureau at metacarta.com> wrote:
> > Hi Arnd,
> >
> > Thanks for sending this test code... can you explain what we should
> > test for, though?
> >
> > ie how do we know if our patch has fixed the problem for you?
> >
> > Erik
> >
> > On 10/3/07, Arnd Wippermann < arnd.wippermann at web.de> wrote:
> > > And the file
> > >
> > > Mit freundlichen Grüssen
> > >
> > > Arnd Wippermann
> > > http://gis.ibbeck.de/ginfo/
> > >
> > >
> > > _______________________________________________
> > > Dev mailing list
> > > Dev at openlayers.org
> > > http://openlayers.org/mailman/listinfo/dev
> > >
> > >
> > >
> > _______________________________________________
> > Dev mailing list
> > Dev at openlayers.org
> > http://openlayers.org/mailman/listinfo/dev
> >
>
>



More information about the Dev mailing list