Merge pull request #10474 from mike-000/patch-2
Fix for undefined source in Image layer
This commit is contained in:
@@ -55,6 +55,7 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] && !isEmpty(renderedExtent)) {
|
if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] && !isEmpty(renderedExtent)) {
|
||||||
|
if (imageSource) {
|
||||||
let projection = viewState.projection;
|
let projection = viewState.projection;
|
||||||
if (!ENABLE_RASTER_REPROJECTION) {
|
if (!ENABLE_RASTER_REPROJECTION) {
|
||||||
const sourceProjection = imageSource.getProjection();
|
const sourceProjection = imageSource.getProjection();
|
||||||
@@ -66,6 +67,9 @@ class CanvasImageLayerRenderer extends CanvasLayerRenderer {
|
|||||||
if (image && this.loadImage(image)) {
|
if (image && this.loadImage(image)) {
|
||||||
this.image_ = image;
|
this.image_ = image;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.image_ = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return !!this.image_;
|
return !!this.image_;
|
||||||
|
|||||||
Reference in New Issue
Block a user