diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index cbc53a949a..855a4cb4f4 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -99,8 +99,8 @@ OpenLayers.Tile.prototype = { }, getBoundsFromBaseLayer: function(position) { - var topLeft = this.layer.map.getLonLatFromLayerPx(this.position); - var bottomRightPx = this.position.clone(); + var topLeft = this.layer.map.getLonLatFromLayerPx(position); + var bottomRightPx = position.clone(); bottomRightPx.x += this.size.w; bottomRightPx.y += this.size.h; var bottomRight = this.layer.map.getLonLatFromLayerPx(bottomRightPx); @@ -112,7 +112,7 @@ OpenLayers.Tile.prototype = { } else { bottomRight.lon = 180+bottomRight.lon+180; } - } + } bounds = new OpenLayers.Bounds(topLeft.lon, bottomRight.lat, bottomRight.lon, topLeft.lat); return bounds; },