the grid layer needs to clear its tile loading timeout when it's removed from the map, or moveGriddedTiles can be called with this.map set to null, r=crschmidt (closes #3110)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11482 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-02-25 12:02:29 +00:00
parent 339d1ebaef
commit 4a4d9b29cd
3 changed files with 23 additions and 1 deletions

View File

@@ -131,6 +131,20 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
);
},
/**
* Method: removeMap
* Called when the layer is removed from the map.
*
* Parameters:
* map - {<OpenLayers.Map>} The map.
*/
removeMap: function(map) {
if(this.timerId != null) {
window.clearTimeout(this.timerId);
this.timerId = null;
}
},
/**
* APIMethod: destroy
* Deconstruct the layer and clear the grid.