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. I've attached a tiny patch to fix it. Best regards, Kikuchan
Grid.patch
Description: Grid.patch
_______________________________________________ Dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-dev
