From 5ae65d413a75e7846b9220c77f02fe63435d17d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sun, 16 Oct 2011 22:40:11 +0200 Subject: [PATCH] the layer may not be in the map anymore when a tile is received --- lib/OpenLayers/Layer/Grid.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 3852c30a2b..dc0a0f8320 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -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);