From 7791ab952e7fda6ac80348255811f71ef5aba69d Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 22 Jun 2006 11:36:25 +0000 Subject: [PATCH] Fix for #69: "Non-visible layers suffer deficiencies when turned on." Add the layerContainer offset to the pixel location of the images, to place them in the map correctly. git-svn-id: http://svn.openlayers.org/trunk/openlayers@669 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Layer/Grid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index aa82bfaa04..5bc9785bca 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -143,8 +143,8 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), { tileoffsetlat+tilelat); var tile = this.addTile(tileBounds, - new OpenLayers.Pixel(tileoffsetx, - tileoffsety) + new OpenLayers.Pixel(tileoffsetx - parseInt(this.map.layerContainerDiv.style.left), + tileoffsety - parseInt(this.map.layerContainerDiv.style.top)) ); tile.draw(); row.append(tile);