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