[OpenLayers-Dev] removeExcessTiles doesn't work properly
eric.lemoine at camptocamp.com
Thu May 24 02:25:19 EDT 2012
On Wed, May 23, 2012 at 11:56 PM, <kikuchan at uranus.dti.ne.jp> wrote:
> Hi list.
> I've found a potential bug in OpenLayers.Layer.Grid class
> when I'm trying to make a subclass of the class.
> A function removeExcessTiles() doesn't work properly in following situation:
> 1. initGriddedTiles() founds minRows and minCols are 1, 3
> 2. then grid will be [[a, b, c]] for example.
> 3. next time of calling initGriddedTiles founds minRows and minCols are 2, 2
> 4. then grid will be [[a, b, c], [d, e]] after the do-while.
> 5. removeExcessTiles(2, 2) eliminate 'c', AND 'e' objects.
> (because it uses 'pop' for each rows)
> 6. tileData[i].tile.draw() refers destroy()ed data, and it crashes.
This sounds like a good fix. Are your familiar with GitHub? Would you
make a pull request against the 2.12 branch for that? A new test
function in tests/Layer/Grid.html for this would also be required.
Also, I'm interested to know how you've come across this bug? In
practice does the bug trigger when resizing the browser window? The
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
More information about the Dev