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
+4 -2
View File
@@ -98,7 +98,8 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
}
//var copyright = response.copyright; // FIXME do we need to display this?
var resource = response.resourceSets[0].resources[0];
goog.asserts.assert(resource.imageWidth == resource.imageHeight);
goog.asserts.assert(resource.imageWidth == resource.imageHeight,
'resource has imageWidth equal to imageHeight, i.e. is square');
var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
var sourceProjection = this.getProjection();
@@ -129,7 +130,8 @@ ol.source.BingMaps.prototype.handleImageryMetadataResponse =
*/
function(tileCoord, pixelRatio, projection) {
goog.asserts.assert(ol.proj.equivalent(
projection, sourceProjection));
projection, sourceProjection),
'projections are equivalent');
if (goog.isNull(tileCoord)) {
return undefined;
} else {