Rename goog.DEBUG to ol.DEBUG
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user