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

View File

@@ -886,7 +886,9 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
this.div.removeChild(this.backBuffer);
this.backBuffer = null;
}
this.lastResolution = this.getServerResolution();
if(this.map) {
this.lastResolution = this.getServerResolution();
}
}
};
tile.events.register("loadend", this, tile.onLoadEnd);