Patch for #430 by Tim Schaub. Reviewed, passes all tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2017 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -99,8 +99,8 @@ OpenLayers.Tile.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getBoundsFromBaseLayer: function(position) {
|
getBoundsFromBaseLayer: function(position) {
|
||||||
var topLeft = this.layer.map.getLonLatFromLayerPx(this.position);
|
var topLeft = this.layer.map.getLonLatFromLayerPx(position);
|
||||||
var bottomRightPx = this.position.clone();
|
var bottomRightPx = position.clone();
|
||||||
bottomRightPx.x += this.size.w;
|
bottomRightPx.x += this.size.w;
|
||||||
bottomRightPx.y += this.size.h;
|
bottomRightPx.y += this.size.h;
|
||||||
var bottomRight = this.layer.map.getLonLatFromLayerPx(bottomRightPx);
|
var bottomRight = this.layer.map.getLonLatFromLayerPx(bottomRightPx);
|
||||||
@@ -112,7 +112,7 @@ OpenLayers.Tile.prototype = {
|
|||||||
} else {
|
} else {
|
||||||
bottomRight.lon = 180+bottomRight.lon+180;
|
bottomRight.lon = 180+bottomRight.lon+180;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bounds = new OpenLayers.Bounds(topLeft.lon, bottomRight.lat, bottomRight.lon, topLeft.lat);
|
bounds = new OpenLayers.Bounds(topLeft.lon, bottomRight.lat, bottomRight.lon, topLeft.lat);
|
||||||
return bounds;
|
return bounds;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user