Add message to assertions.
This commit is contained in:
@@ -110,7 +110,8 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame =
|
||||
var image = this.image_;
|
||||
var texture = this.texture;
|
||||
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;
|
||||
@@ -125,7 +126,8 @@ ol.renderer.webgl.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;
|
||||
}
|
||||
var image_ = imageSource.getImage(renderedExtent, viewResolution,
|
||||
@@ -153,7 +155,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame =
|
||||
}
|
||||
|
||||
if (!goog.isNull(image)) {
|
||||
goog.asserts.assert(!goog.isNull(texture));
|
||||
goog.asserts.assert(!goog.isNull(texture), 'texture is not null');
|
||||
|
||||
var canvas = this.mapRenderer.getContext().getCanvas();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user