Don't inherit ol.PixelBounds from ol.Rectangle

This commit is contained in:
Tom Payne
2013-04-16 13:21:27 +02:00
parent 1ad7765f2f
commit 0da8b0ae7f
2 changed files with 25 additions and 9 deletions

View File

@@ -150,10 +150,10 @@ ol.tilegrid.TileGrid.prototype.getPixelBoundsForTileCoordAndResolution =
var tileWidth = tileSize.width / scale;
var tileHeight = tileSize.height / scale;
var minX = Math.round(tileCoord.x * tileWidth);
var minY = Math.round(tileCoord.y * tileHeight);
var maxX = Math.round((tileCoord.x + 1) * tileWidth);
var minY = Math.round(tileCoord.y * tileHeight);
var maxY = Math.round((tileCoord.y + 1) * tileHeight);
return new ol.PixelBounds(minX, minY, maxX, maxY);
return new ol.PixelBounds(minX, maxX, minY, maxY);
};