[OpenLayers-Dev] Exception in
OpenLayers.Layer.Grid.removeBackBuffer
Eric Lemoine
eric.lemoine at camptocamp.com
Thu Mar 15 03:55:39 EDT 2012
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
More information about the Dev
mailing list