Merge branch 'master' into clientzoom

This commit is contained in:
Éric Lemoine
2011-10-07 13:36:58 +02:00
75 changed files with 326 additions and 1113 deletions

View File

@@ -516,6 +516,18 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
* tileoffsetlat, tileoffsetx, tileoffsety
*/
calculateGridLayout: function(bounds, origin, resolution) {
bounds = bounds.clone();
if (this.map.baseLayer.wrapDateLine) {
var maxExtent = this.map.getMaxExtent(),
width = maxExtent.getWidth();
// move the bounds one world width to the right until the origin is
// within the world extent
while (bounds.left < maxExtent.left) {
bounds.left += width;
bounds.right += width;
}
}
var tilelon = resolution * this.tileSize.w;
var tilelat = resolution * this.tileSize.h;