Make ol.renderer.Map behave like a null renderer, fixes #82
With this patch, creating a new ol.renderer.Map will return a map renderer that does nothing. Previously, it could cause assertion failures.
This commit is contained in:
@@ -228,7 +228,15 @@ ol.renderer.dom.Map.prototype.render = function() {
|
||||
this.renderedRotation_ = mapRotation;
|
||||
this.renderedSize_ = mapSize;
|
||||
|
||||
return goog.base(this, 'render');
|
||||
var animate = false;
|
||||
this.forEachReadyVisibleLayer(function(layer, layerRenderer) {
|
||||
if (layerRenderer.render()) {
|
||||
animate = true;
|
||||
}
|
||||
});
|
||||
|
||||
return animate;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user