[OpenLayers-Dev] Exception in
OpenLayers.Layer.Grid.removeBackBuffer
Tim-Hinnerk Heuer
th.heuer at gmail.com
Thu Mar 15 03:46:40 EDT 2012
Cool. Will try that tomorrow.
++Tim Hinnerk Heuer++
Twitter: @timhheuer
Blog: http://www.thheuer.com
On Thu, Mar 15, 2012 at 8:18 PM, Andreas Hocevar <ahocevar at opengeo.org>wrote:
> Hey,
>
> @Eric: after looking more, I see that OpenLayers.Layer::clone puts all
> properties from the original on the clone:
>
> // catch any randomly tagged-on properties
> OpenLayers.Util.applyDefaults(obj, this);
>
> This is also the reason why we manually create a new grid in
> Layer.WMS::clone.
>
> @Tim: can you please try to apply the following patch and see if it
> fixes the issue?
>
> ----------
> diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js
> index adf5163..b8e5bd4 100644
> --- a/lib/OpenLayers/Layer/Grid.js
> +++ b/lib/OpenLayers/Layer/Grid.js
> @@ -317,6 +317,8 @@ OpenLayers.Layer.Grid = OpenLayers.Class(
> OpenLayers.Layer.HT
> // we do not want to copy reference to grid, so we make a new
> array
> obj.grid = [];
> obj.gridResolution = null;
> + // same for the backbuffer
> + obj.backBuffer = null;
>
> return obj;
> },
> ----------
>
> Thanks,
> Andreas.
>
> On Wed, Mar 14, 2012 at 8:28 AM, Eric Lemoine
> <eric.lemoine at camptocamp.com> wrote:
> > On Wed, Mar 14, 2012 at 8:08 AM, Andreas Hocevar <ahocevar at opengeo.org>
> 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
> >
> > I had thought about this too. But I'm still failing to understand how
> > cloning can lead to this state. Do you mind elaborating a bit? Thank
> > you.
> >
> >
> > --
> > Eric Lemoine
> >
> > Camptocamp France SAS
> > Savoie Technolac, BP 352
> > 73377 Le Bourget du Lac, Cedex
> >
> > Tel : 00 33 4 79 44 44 96
> > Mail : eric.lemoine at camptocamp.com
> > http://www.camptocamp.com
> > _______________________________________________
> > Dev mailing list
> > Dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120315/bac88f52/attachment-0001.html
More information about the Dev
mailing list