the layer may not be in the map anymore when a tile is received

This commit is contained in:
Éric Lemoine
2011-10-16 22:40:11 +02:00
parent 2dbbef8c6f
commit 5ae65d413a
+3 -1
View File
@@ -886,7 +886,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
this.div.removeChild(this.backBuffer); this.div.removeChild(this.backBuffer);
this.backBuffer = null; this.backBuffer = null;
} }
this.lastResolution = this.getServerResolution(); if(this.map) {
this.lastResolution = this.getServerResolution();
}
} }
}; };
tile.events.register("loadend", this, tile.onLoadEnd); tile.events.register("loadend", this, tile.onLoadEnd);