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

@@ -109,8 +109,6 @@ ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) {
output = new Array(length);
}
}
ol.DEBUG && console.assert(output.length % dimension === 0,
'modulus of output.length with dimension should be 0');
var halfSize = ol.proj.EPSG3857.HALF_SIZE;
for (var i = 0; i < length; i += dimension) {
output[i] = halfSize * input[i] / 180;
@@ -147,8 +145,6 @@ ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
output = new Array(length);
}
}
ol.DEBUG && console.assert(output.length % dimension === 0,
'modulus of output.length with dimension should be 0');
for (var i = 0; i < length; i += dimension) {
output[i] = 180 * input[i] / ol.proj.EPSG3857.HALF_SIZE;
output[i + 1] = 360 * Math.atan(

View File

@@ -36,72 +36,69 @@ goog.require('ol.proj.proj4');
* @api stable
*/
ol.proj.Projection = function(options) {
/**
* @private
* @type {string}
*/
/**
* @private
* @type {string}
*/
this.code_ = options.code;
/**
* @private
* @type {ol.proj.Units}
*/
/**
* @private
* @type {ol.proj.Units}
*/
this.units_ = /** @type {ol.proj.Units} */ (options.units);
/**
* @private
* @type {ol.Extent}
*/
/**
* @private
* @type {ol.Extent}
*/
this.extent_ = options.extent !== undefined ? options.extent : null;
/**
* @private
* @type {ol.Extent}
*/
/**
* @private
* @type {ol.Extent}
*/
this.worldExtent_ = options.worldExtent !== undefined ?
options.worldExtent : null;
options.worldExtent : null;
/**
* @private
* @type {string}
*/
/**
* @private
* @type {string}
*/
this.axisOrientation_ = options.axisOrientation !== undefined ?
options.axisOrientation : 'enu';
options.axisOrientation : 'enu';
/**
* @private
* @type {boolean}
*/
/**
* @private
* @type {boolean}
*/
this.global_ = options.global !== undefined ? options.global : false;
/**
* @private
* @type {boolean}
*/
/**
* @private
* @type {boolean}
*/
this.canWrapX_ = !!(this.global_ && this.extent_);
/**
* @private
* @type {function(number, ol.Coordinate):number|undefined}
*/
/**
* @private
* @type {function(number, ol.Coordinate):number|undefined}
*/
this.getPointResolutionFunc_ = options.getPointResolution;
/**
* @private
* @type {ol.tilegrid.TileGrid}
*/
/**
* @private
* @type {ol.tilegrid.TileGrid}
*/
this.defaultTileGrid_ = null;
/**
* @private
* @type {number|undefined}
*/
/**
* @private
* @type {number|undefined}
*/
this.metersPerUnit_ = options.metersPerUnit;
var code = options.code;
ol.DEBUG && console.assert(code !== undefined,
'Option "code" is required for constructing instance');
if (ol.ENABLE_PROJ4JS) {
var proj4js = ol.proj.proj4.get();
if (typeof proj4js == 'function') {
@@ -119,7 +116,6 @@ ol.proj.Projection = function(options) {
}
}
}
};

View File

@@ -51,10 +51,6 @@ ol.proj.transforms.remove = function(source, destination) {
var sourceCode = source.getCode();
var destinationCode = destination.getCode();
var transforms = ol.proj.transforms.cache_;
ol.DEBUG && console.assert(sourceCode in transforms,
'sourceCode should be in transforms');
ol.DEBUG && console.assert(destinationCode in transforms[sourceCode],
'destinationCode should be in transforms of sourceCode');
var transform = transforms[sourceCode][destinationCode];
delete transforms[sourceCode][destinationCode];
if (ol.obj.isEmpty(transforms[sourceCode])) {