Update logos in renderers
This commit is contained in:
@@ -115,5 +115,6 @@ ol.renderer.canvas.ImageLayer.prototype.renderFrame =
|
||||
0);
|
||||
|
||||
this.updateAttributions(frameState.attributions, image.getAttributions());
|
||||
this.updateLogos(frameState, imageSource);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -286,6 +286,7 @@ ol.renderer.canvas.TileLayer.prototype.renderFrame =
|
||||
this.manageTilePyramid(frameState, tileSource, tileGrid, projection, extent,
|
||||
z, tileLayer.getPreload());
|
||||
this.scheduleExpireCache(frameState, tileSource);
|
||||
this.updateLogos(frameState, tileSource);
|
||||
|
||||
var transform = this.transform_;
|
||||
goog.vec.Mat4.makeIdentity(transform);
|
||||
|
||||
@@ -109,6 +109,7 @@ ol.renderer.dom.ImageLayer.prototype.renderFrame =
|
||||
this.setTransform(transform);
|
||||
|
||||
this.updateAttributions(frameState.attributions, image.getAttributions());
|
||||
this.updateLogos(frameState, imageSource);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -221,6 +221,7 @@ ol.renderer.dom.TileLayer.prototype.renderFrame =
|
||||
this.manageTilePyramid(frameState, tileSource, tileGrid, projection, extent,
|
||||
z, tileLayer.getPreload());
|
||||
this.scheduleExpireCache(frameState, tileSource);
|
||||
this.updateLogos(frameState, tileSource);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ goog.require('ol.TileState');
|
||||
goog.require('ol.layer.Layer');
|
||||
goog.require('ol.layer.LayerProperty');
|
||||
goog.require('ol.layer.LayerState');
|
||||
goog.require('ol.source.Source');
|
||||
goog.require('ol.source.TileSource');
|
||||
|
||||
|
||||
@@ -220,6 +221,19 @@ ol.renderer.Layer.prototype.updateAttributions =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {ol.FrameState} frameState Frame state.
|
||||
* @param {ol.source.Source} source Source.
|
||||
*/
|
||||
ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
|
||||
var logo = source.getLogo();
|
||||
if (goog.isDef(logo)) {
|
||||
frameState.logos[logo] = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
||||
|
||||
@@ -137,6 +137,7 @@ ol.renderer.webgl.ImageLayer.prototype.renderFrame =
|
||||
this.texture = texture;
|
||||
|
||||
this.updateAttributions(frameState.attributions, image.getAttributions());
|
||||
this.updateLogos(frameState, imageSource);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -282,6 +282,7 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
|
||||
}
|
||||
}, this);
|
||||
this.scheduleExpireCache(frameState, tileSource);
|
||||
this.updateLogos(frameState, tileSource);
|
||||
|
||||
var texCoordMatrix = this.texCoordMatrix;
|
||||
goog.vec.Mat4.makeIdentity(texCoordMatrix);
|
||||
|
||||
Reference in New Issue
Block a user