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

@@ -156,7 +156,8 @@ ol.renderer.canvas.ImageLayer.prototype.prepareFrame =
var image;
var imageLayer = this.getLayer();
goog.asserts.assertInstanceof(imageLayer, ol.layer.Image);
goog.asserts.assertInstanceof(imageLayer, ol.layer.Image,
'layer is an instance of ol.layer.Image');
var imageSource = imageLayer.getSource();
var hints = frameState.viewHints;
@@ -172,7 +173,8 @@ ol.renderer.canvas.ImageLayer.prototype.prepareFrame =
var projection = viewState.projection;
var sourceProjection = imageSource.getProjection();
if (!goog.isNull(sourceProjection)) {
goog.asserts.assert(ol.proj.equivalent(projection, sourceProjection));
goog.asserts.assert(ol.proj.equivalent(projection, sourceProjection),
'projection and sourceProjection are equivalent');
projection = sourceProjection;
}
image = imageSource.getImage(