Rename goog.DEBUG to ol.DEBUG

This commit is contained in:
Andreas Hocevar
2016-08-28 17:02:49 +02:00
parent 92ab5a079c
commit d1e4b33760
115 changed files with 701 additions and 691 deletions

View File

@@ -114,11 +114,11 @@ ol.tilegrid.TileGrid = function(options) {
this.tmpSize_ = [0, 0];
if (options.sizes !== undefined) {
goog.DEBUG && console.assert(options.sizes.length == this.resolutions_.length,
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) {
goog.DEBUG && console.assert(size[0] !== 0, 'width must not be 0');
goog.DEBUG && console.assert(size[1] !== 0, 'height must not be 0');
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,7 +218,7 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
if (this.origin_) {
return this.origin_;
} else {
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
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,7 +233,7 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
* @api stable
*/
ol.tilegrid.TileGrid.prototype.getResolution = function(z) {
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
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,7 +426,7 @@ ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ = function(coordinate, z
* @return {number} Tile resolution.
*/
ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
goog.DEBUG && console.assert(
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);
@@ -446,7 +446,7 @@ ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {
if (this.tileSize_) {
return this.tileSize_;
} else {
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
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,7 +462,7 @@ ol.tilegrid.TileGrid.prototype.getFullTileRange = function(z) {
if (!this.fullTileRanges_) {
return null;
} else {
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
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,7 +17,7 @@ goog.require('ol.tilegrid.TileGrid');
*/
ol.tilegrid.WMTS = function(options) {
goog.DEBUG && console.assert(
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);
@@ -48,7 +48,7 @@ ol.inherits(ol.tilegrid.WMTS, ol.tilegrid.TileGrid);
* @return {string} MatrixId..
*/
ol.tilegrid.WMTS.prototype.getMatrixId = function(z) {
goog.DEBUG && console.assert(0 <= z && z < this.matrixIds_.length,
ol.DEBUG && console.assert(0 <= z && z < this.matrixIds_.length,
'attempted to retrieve matrixId for illegal z (%s)', z);
return this.matrixIds_[z];
};