[OpenLayers-Dev] Exception in
OpenLayers.Layer.Grid.removeBackBuffer
Eric Lemoine
eric.lemoine at camptocamp.com
Wed Mar 14 01:16:20 EDT 2012
On Wednesday, March 14, 2012, Tim-Hinnerk Heuer <th.heuer at gmail.com> 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 : 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/20120314/29b38b3d/attachment.html
More information about the Dev
mailing list