diff --git a/src/ol/source/imagecanvassource.js b/src/ol/source/imagecanvassource.js index 221104d822..30abfbf469 100644 --- a/src/ol/source/imagecanvassource.js +++ b/src/ol/source/imagecanvassource.js @@ -35,6 +35,12 @@ ol.source.ImageCanvas = function(options) { */ this.canvas_ = null; + /** + * @private + * @type {number} + */ + this.renderedRevision_ = 0; + /** * @private * @type {number} @@ -55,6 +61,7 @@ ol.source.ImageCanvas.prototype.getImage = var canvas = this.canvas_; if (!goog.isNull(canvas) && + this.renderedRevision_ == this.getRevision() && canvas.getResolution() == resolution && canvas.getPixelRatio() == pixelRatio && ol.extent.containsExtent(canvas.getExtent(), extent)) { @@ -74,6 +81,7 @@ ol.source.ImageCanvas.prototype.getImage = this.getAttributions(), canvasElement); } this.canvas_ = canvas; + this.renderedRevision_ = this.getRevision(); return canvas; };