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:
@@ -593,7 +593,7 @@
|
||||
|
||||
function test_Layer_Grid_destroy (t) {
|
||||
|
||||
t.plan( 7 );
|
||||
t.plan( 8 );
|
||||
|
||||
var map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.Grid(name, url, params);
|
||||
@@ -608,6 +608,7 @@
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0,0), 10);
|
||||
map.setCenter(new OpenLayers.LonLat(1,1));
|
||||
|
||||
|
||||
//grab a reference to one of the tiles
|
||||
@@ -616,6 +617,7 @@
|
||||
|
||||
layer.destroy();
|
||||
t.eq( tile.imgDiv, null, "Tile destroyed" );
|
||||
t.eq( layer.timerId, null, "Tile loading timeout cleared");
|
||||
|
||||
t.ok( layer.grid == null, "tiles appropriately destroyed")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user