Remove ol.DEBUG

This commit is contained in:
Tim Schaub
2016-12-29 09:09:24 -07:00
parent 7b9690a691
commit 137cdc04c8
128 changed files with 309 additions and 2027 deletions

View File

@@ -114,11 +114,7 @@ ol.tilegrid.TileGrid = function(options) {
this.tmpSize_ = [0, 0];
if (options.sizes !== undefined) {
ol.DEBUG && console.assert(options.sizes.length == this.resolutions_.length,
'number of sizes and resolutions must be equal');
this.fullTileRanges_ = options.sizes.map(function(size, z) {
ol.DEBUG && console.assert(size[0] !== 0, 'width must not be 0');
ol.DEBUG && console.assert(size[1] !== 0, 'height must not be 0');
var tileRange = new ol.TileRange(
Math.min(0, size[0]), Math.max(size[0] - 1, -1),
Math.min(0, size[1]), Math.max(size[1] - 1, -1));
@@ -218,9 +214,6 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
if (this.origin_) {
return this.origin_;
} else {
ol.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'given z is not in allowed range (%s <= %s <= %s)',
this.minZoom, z, this.maxZoom);
return this.origins_[z];
}
};
@@ -233,9 +226,6 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
* @api stable
*/
ol.tilegrid.TileGrid.prototype.getResolution = function(z) {
ol.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'given z is not in allowed range (%s <= %s <= %s)',
this.minZoom, z, this.maxZoom);
return this.resolutions_[z];
};
@@ -426,10 +416,6 @@ ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ = function(coordinate, z
* @return {number} Tile resolution.
*/
ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
ol.DEBUG && console.assert(
this.minZoom <= tileCoord[0] && tileCoord[0] <= this.maxZoom,
'z of given tilecoord is not in allowed range (%s <= %s <= %s',
this.minZoom, tileCoord[0], this.maxZoom);
return this.resolutions_[tileCoord[0]];
};
@@ -446,9 +432,6 @@ ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {
if (this.tileSize_) {
return this.tileSize_;
} else {
ol.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'z is not in allowed range (%s <= %s <= %s',
this.minZoom, z, this.maxZoom);
return this.tileSizes_[z];
}
};
@@ -462,9 +445,6 @@ ol.tilegrid.TileGrid.prototype.getFullTileRange = function(z) {
if (!this.fullTileRanges_) {
return null;
} else {
ol.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'z is not in allowed range (%s <= %s <= %s',
this.minZoom, z, this.maxZoom);
return this.fullTileRanges_[z];
}
};

View File

@@ -17,12 +17,6 @@ goog.require('ol.tilegrid.TileGrid');
* @api
*/
ol.tilegrid.WMTS = function(options) {
ol.DEBUG && console.assert(
options.resolutions.length == options.matrixIds.length,
'options resolutions and matrixIds must have equal length (%s == %s)',
options.resolutions.length, options.matrixIds.length);
/**
* @private
* @type {!Array.<string>}
@@ -39,7 +33,6 @@ ol.tilegrid.WMTS = function(options) {
tileSizes: options.tileSizes,
sizes: options.sizes
});
};
ol.inherits(ol.tilegrid.WMTS, ol.tilegrid.TileGrid);
@@ -49,8 +42,6 @@ ol.inherits(ol.tilegrid.WMTS, ol.tilegrid.TileGrid);
* @return {string} MatrixId..
*/
ol.tilegrid.WMTS.prototype.getMatrixId = function(z) {
ol.DEBUG && console.assert(0 <= z && z < this.matrixIds_.length,
'attempted to retrieve matrixId for illegal z (%s)', z);
return this.matrixIds_[z];
};