Add message to assertions.

This commit is contained in:
Marc Jansen
2015-03-30 22:50:15 +02:00
parent 2c40d74a15
commit fb9ba22c30
45 changed files with 394 additions and 221 deletions

View File

@@ -139,7 +139,8 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
goog.asserts.assert(!('VERSION' in params));
goog.asserts.assert(!('VERSION' in params),
'key VERSION is not allowed in params');
if (!goog.isDef(this.url_)) {
return undefined;
@@ -279,7 +280,7 @@ ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
ol.source.ImageWMS.prototype.getRequestUrl_ =
function(extent, size, pixelRatio, projection, params) {
goog.asserts.assert(goog.isDef(this.url_));
goog.asserts.assert(goog.isDef(this.url_), 'url is defined');
params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
@@ -303,7 +304,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ =
params['DPI'] = 90 * pixelRatio;
break;
default:
goog.asserts.fail();
goog.asserts.fail('unknown serverType configured');
break;
}
}