Hi Andreas,

Ah that sounds genius!

I'm cloning the layers, probably while the layers are not completely
loaded. So, I'm guessing an OpenLayers bug following your logic. Hey, we
might get to the bottom of this yet. Will have another look at OL tomorrow,
but it seems you are spot on, Andreas. Can you let me know if you have time
to look at it. You seem to know that part of OL better.

Cheers,
Tim

On Wed, Mar 14, 2012 at 8:08 PM, Andreas Hocevar <[email protected]>wrote:

> The only occasions I could think of that could potentially make
> this.backBuffer both non-null and not a child of this.div is when a
> layer is cloned during tile loading, or when the layer is added to a
> second map without cloning it. The latter would be an application bug,
> the former an OpenLayers one.
>
> Andreas.
>
> On Wed, Mar 14, 2012 at 6:16 AM, Eric Lemoine
> <[email protected]> wrote:
> >
> >
> > On Wednesday, March 14, 2012, Tim-Hinnerk Heuer <[email protected]>
> wrote:
> >> Hi Eric,
> >> I couldn't reproduce the problem in any simple example. However, I did
> fix
> >> it within OpenLayers. Basically, I changed a couple of lines:
> >>     /**
> >>      * Method: removeBackBuffer
> >>      * Remove back buffer from DOM.
> >>      */
> >>     removeBackBuffer: function() {
> >>         if(this.backBuffer) {
> >>             if (this.div.hasChildNodes(this.backBuffer)) { // ADDED THIS
> >> LINE
> >>                 this.div.removeChild(this.backBuffer);
> >>             } // AND OF COURSE THIS
> >>             this.backBuffer = null;
> >>             this.backBufferResolution = null;
> >>             if(this.backBufferTimerId !== null) {
> >>                 window.clearTimeout(this.backBufferTimerId);
> >>                 this.backBufferTimerId = null;
> >>             }
> >>         }
> >>     },
> >> It's in my public repo. Should I make a pull request? I know it's yet
> >> another check and might slow down things, but stability seems more
> >> important. What do you think?
> >
> >
> > I'm sure this fixes it. The thing is I really don't understand how
> > this.backBuffer can be both non-null and not a child of this.div. I think
> > this should never occur. It may occur there's some code that empties the
> > layer div without calling removeBackBuffer beforehands, but the lib does
> not
> > have such code as far as I know.
> >
> >
> > --
> > Eric Lemoine
> >
> > Camptocamp France SAS
> > Savoie Technolac, BP 352
> > 73377 Le Bourget du Lac, Cedex
> >
> > Tel : 00 33 4 79 44 44 96
> > Mail : [email protected]
> > http://www.camptocamp.com
> >
> >
> > _______________________________________________
> > Dev mailing list
> > [email protected]
> > http://lists.osgeo.org/mailman/listinfo/openlayers-dev
> >
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
_______________________________________________
Dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to