Merge pull request #637 from twpayne/remove-unused-functions
Remove unused functions
This commit is contained in:
@@ -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;
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -5,7 +5,6 @@ goog.provide('ol.tilegrid.TileGrid');
|
|||||||
goog.require('goog.array');
|
goog.require('goog.array');
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
goog.require('ol.Coordinate');
|
goog.require('ol.Coordinate');
|
||||||
goog.require('ol.PixelBounds');
|
|
||||||
goog.require('ol.Projection');
|
goog.require('ol.Projection');
|
||||||
goog.require('ol.Size');
|
goog.require('ol.Size');
|
||||||
goog.require('ol.TileCoord');
|
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.
|
* @param {number} z Z.
|
||||||
* @return {number} Resolution.
|
* @return {number} Resolution.
|
||||||
|
|||||||
Reference in New Issue
Block a user