[OpenLayers-Dev] Exception in OpenLayers.Layer.Grid.removeBackBuffer

Tim-Hinnerk Heuer th.heuer at gmail.com
Thu Mar 15 18:47:10 EDT 2012


You're a champ Andreas! This does fix the problem, well done. Much better
solution than my check/try/catch!
So, in the end it was the cloning code huh? :-P

The patch did not work for me though. Maybe because I was using a slightly
different version from yours, but I did the patch manually, since it was
only really one line.

Would be happy to commit that into upstream. You should put it in the
master branch.

Tim

Twitter: @timhheuer
Blog: http://www.thheuer.com



On Thu, Mar 15, 2012 at 8:55 PM, Eric Lemoine
<eric.lemoine at camptocamp.com>wrote:

> On Thu, Mar 15, 2012 at 8:18 AM, 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;
> >     },
> > ----------
>
>
>
> Good spotting Andreas! I'm looking forward to Tim's feedback.
>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120316/64abba9a/attachment.html


More information about the Dev mailing list