Use goog.DEBUG instead of ol.DEBUG for now

This commit is contained in:
Andreas Hocevar
2016-08-04 09:37:42 +02:00
parent 55ab5704d4
commit e0015b3d4e
121 changed files with 712 additions and 721 deletions
+2 -2
View File
@@ -113,7 +113,7 @@ ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) {
output = new Array(length);
}
}
ol.DEBUG && console.assert(output.length % dimension === 0,
goog.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] = ol.proj.EPSG3857.RADIUS * Math.PI * input[i] / 180;
@@ -144,7 +144,7 @@ ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
output = new Array(length);
}
}
ol.DEBUG && console.assert(output.length % dimension === 0,
goog.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.RADIUS * Math.PI);
+6 -6
View File
@@ -136,7 +136,7 @@ ol.proj.Projection = function(options) {
var projections = ol.proj.projections_;
var code = options.code;
ol.DEBUG && console.assert(code !== undefined,
goog.DEBUG && console.assert(code !== undefined,
'Option "code" is required for constructing instance');
if (ol.ENABLE_PROJ4JS) {
var proj4js = ol.proj.proj4_ || ol.global['proj4'];
@@ -416,7 +416,7 @@ if (ol.ENABLE_PROJ4JS) {
* @api
*/
ol.proj.setProj4 = function(proj4) {
ol.DEBUG && console.assert(typeof proj4 == 'function',
goog.DEBUG && console.assert(typeof proj4 == 'function',
'proj4 argument should be a function');
ol.proj.proj4_ = proj4;
};
@@ -608,9 +608,9 @@ ol.proj.removeTransform = function(source, destination) {
var sourceCode = source.getCode();
var destinationCode = destination.getCode();
var transforms = ol.proj.transforms_;
ol.DEBUG && console.assert(sourceCode in transforms,
goog.DEBUG && console.assert(sourceCode in transforms,
'sourceCode should be in transforms');
ol.DEBUG && console.assert(destinationCode in transforms[sourceCode],
goog.DEBUG && console.assert(destinationCode in transforms[sourceCode],
'destinationCode should be in transforms of sourceCode');
var transform = transforms[sourceCode][destinationCode];
delete transforms[sourceCode][destinationCode];
@@ -741,7 +741,7 @@ ol.proj.getTransformFromProjections = function(sourceProjection, destinationProj
transform = transforms[sourceCode][destinationCode];
}
if (transform === undefined) {
ol.DEBUG && console.assert(transform !== undefined, 'transform should be defined');
goog.DEBUG && console.assert(transform !== undefined, 'transform should be defined');
transform = ol.proj.identityTransform;
}
return transform;
@@ -757,7 +757,7 @@ ol.proj.getTransformFromProjections = function(sourceProjection, destinationProj
ol.proj.identityTransform = function(input, opt_output, opt_dimension) {
if (opt_output !== undefined && input !== opt_output) {
// TODO: consider making this a warning instead
ol.DEBUG && console.assert(false, 'This should not be used internally.');
goog.DEBUG && console.assert(false, 'This should not be used internally.');
for (var i = 0, ii = input.length; i < ii; ++i) {
opt_output[i] = input[i];
}