Display attributions and logos for vector sources
This commit is contained in:
@@ -164,15 +164,20 @@ ol.renderer.canvas.VectorLayer.prototype.handleImageStyleChange_ =
|
|||||||
ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
||||||
function(frameState, layerState) {
|
function(frameState, layerState) {
|
||||||
|
|
||||||
|
var vectorLayer = this.getLayer();
|
||||||
|
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector);
|
||||||
|
var vectorSource = vectorLayer.getSource();
|
||||||
|
goog.asserts.assertInstanceof(vectorSource, ol.source.Vector);
|
||||||
|
|
||||||
|
this.updateAttributions(
|
||||||
|
frameState.attributions, vectorSource.getAttributions());
|
||||||
|
this.updateLogos(frameState, vectorSource);
|
||||||
|
|
||||||
if (!this.dirty_ && (frameState.viewHints[ol.ViewHint.ANIMATING] ||
|
if (!this.dirty_ && (frameState.viewHints[ol.ViewHint.ANIMATING] ||
|
||||||
frameState.viewHints[ol.ViewHint.INTERACTING])) {
|
frameState.viewHints[ol.ViewHint.INTERACTING])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var vectorLayer = this.getLayer();
|
|
||||||
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector);
|
|
||||||
var vectorSource = vectorLayer.getSource();
|
|
||||||
goog.asserts.assertInstanceof(vectorSource, ol.source.Vector);
|
|
||||||
var frameStateExtent = frameState.extent;
|
var frameStateExtent = frameState.extent;
|
||||||
var frameStateResolution = frameState.view2DState.resolution;
|
var frameStateResolution = frameState.view2DState.resolution;
|
||||||
var pixelRatio = frameState.devicePixelRatio;
|
var pixelRatio = frameState.devicePixelRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user