From ee2e44822040760670b05678d55542f7ec401d54 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sat, 20 Apr 2013 17:05:17 +0200 Subject: [PATCH 1/2] Remove ol.tilegrid.TileGrid#getPixelBoundsForTileCoordAndResolution --- src/ol/tilegrid/tilegrid.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/ol/tilegrid/tilegrid.js b/src/ol/tilegrid/tilegrid.js index e987c31cae..c906dbd46f 100644 --- a/src/ol/tilegrid/tilegrid.js +++ b/src/ol/tilegrid/tilegrid.js @@ -5,7 +5,6 @@ goog.provide('ol.tilegrid.TileGrid'); goog.require('goog.array'); goog.require('goog.asserts'); goog.require('ol.Coordinate'); -goog.require('ol.PixelBounds'); goog.require('ol.Projection'); goog.require('ol.Size'); goog.require('ol.TileCoord'); @@ -138,25 +137,6 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) { }; -/** - * @param {ol.TileCoord} tileCoord Tile coordinate. - * @param {number} resolution Resolution. - * @return {ol.PixelBounds} Pixel bounds. - */ -ol.tilegrid.TileGrid.prototype.getPixelBoundsForTileCoordAndResolution = - function(tileCoord, resolution) { - var scale = resolution / this.getResolution(tileCoord.z); - var tileSize = this.getTileSize(tileCoord.z); - var tileWidth = tileSize.width / scale; - var tileHeight = tileSize.height / scale; - var minX = Math.round(tileCoord.x * tileWidth); - 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, maxX, minY, maxY); -}; - - /** * @param {number} z Z. * @return {number} Resolution. From 4c42f4e1ba0cc96ef5e9b5143acff3f3a784fbdb Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 22 Apr 2013 10:14:22 +0200 Subject: [PATCH 2/2] Remove ol.PixelBounds --- src/ol/pixelbounds.js | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/ol/pixelbounds.js diff --git a/src/ol/pixelbounds.js b/src/ol/pixelbounds.js deleted file mode 100644 index 54f941edef..0000000000 --- a/src/ol/pixelbounds.js +++ /dev/null @@ -1,34 +0,0 @@ -goog.provide('ol.PixelBounds'); - - - -/** - * @constructor - * @param {number} minX Minimum X. - * @param {number} maxX Maximum X. - * @param {number} minY Minimum Y. - * @param {number} maxY Maximum Y. - */ -ol.PixelBounds = function(minX, maxX, minY, maxY) { - - /** - * @type {number} - */ - this.minX = minX; - - /** - * @type {number} - */ - this.maxX = maxX; - - /** - * @type {number} - */ - this.minY = minY; - - /** - * @type {number} - */ - this.maxY = maxY; - -};