clearGrid() gets called only once, no reason to put it so far away from where it gets called. tired of scrolling
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -47,6 +47,23 @@ OpenLayers.Layer.Grid.prototype =
|
||||
OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments);
|
||||
},
|
||||
|
||||
/** go through and remove all tiles from the grid, calling
|
||||
* destroy() on each of them to kill circular references
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
clearGrid:function() {
|
||||
if (this.grid) {
|
||||
for(var iRow=0; iRow < this.grid.length; iRow++) {
|
||||
var row = this.grid[iRow];
|
||||
for(var iCol=0; iCol < row.length; iCol++) {
|
||||
row[iCol].destroy();
|
||||
}
|
||||
}
|
||||
this.grid = [];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Object} obj
|
||||
*
|
||||
@@ -366,23 +383,6 @@ OpenLayers.Layer.Grid.prototype =
|
||||
},
|
||||
|
||||
|
||||
/** go through and remove all tiles from the grid, calling
|
||||
* destroy() on each of them to kill circular references
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
clearGrid:function() {
|
||||
if (this.grid) {
|
||||
for(var iRow=0; iRow < this.grid.length; iRow++) {
|
||||
var row = this.grid[iRow];
|
||||
for(var iCol=0; iCol < row.length; iCol++) {
|
||||
row[iCol].destroy();
|
||||
}
|
||||
}
|
||||
this.grid = [];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user