Remove logos
This commit is contained in:
@@ -5,7 +5,6 @@ import {getUid, inherits, nullFunction} from '../index.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import _ol_Observable_ from '../Observable.js';
|
||||
import _ol_TileState_ from '../TileState.js';
|
||||
import _ol_asserts_ from '../asserts.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {FALSE} from '../functions.js';
|
||||
@@ -166,25 +165,6 @@ _ol_renderer_Layer_.prototype.scheduleExpireCache = function(frameState, tileSou
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {olx.FrameState} frameState Frame state.
|
||||
* @param {ol.source.Source} source Source.
|
||||
* @protected
|
||||
*/
|
||||
_ol_renderer_Layer_.prototype.updateLogos = function(frameState, source) {
|
||||
var logo = source.getLogo();
|
||||
if (logo !== undefined) {
|
||||
if (typeof logo === 'string') {
|
||||
frameState.logos[logo] = '';
|
||||
} else if (logo) {
|
||||
_ol_asserts_.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
|
||||
_ol_asserts_.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
|
||||
frameState.logos[logo.src] = logo.href;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
|
||||
@@ -187,7 +187,6 @@ _ol_renderer_canvas_ImageLayer_.prototype.prepareFrame = function(frameState, la
|
||||
0,
|
||||
-viewCenter[0], -viewCenter[1]);
|
||||
|
||||
this.updateLogos(frameState, imageSource);
|
||||
this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;
|
||||
}
|
||||
|
||||
|
||||
@@ -292,7 +292,6 @@ _ol_renderer_canvas_TileLayer_.prototype.prepareFrame = function(frameState, lay
|
||||
this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,
|
||||
projection, extent, z, tileLayer.getPreload());
|
||||
this.scheduleExpireCache(frameState, tileSource);
|
||||
this.updateLogos(frameState, tileSource);
|
||||
|
||||
return this.renderedTiles.length > 0;
|
||||
};
|
||||
|
||||
@@ -299,12 +299,9 @@ _ol_renderer_canvas_VectorLayer_.prototype.handleStyleImageChange_ = function(ev
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_renderer_canvas_VectorLayer_.prototype.prepareFrame = function(frameState, layerState) {
|
||||
|
||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
var vectorSource = vectorLayer.getSource();
|
||||
|
||||
this.updateLogos(frameState, vectorSource);
|
||||
|
||||
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
||||
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
||||
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
||||
|
||||
@@ -189,8 +189,6 @@ _ol_renderer_webgl_ImageLayer_.prototype.prepareFrame = function(frameState, lay
|
||||
|
||||
this.image_ = image;
|
||||
this.texture = texture;
|
||||
|
||||
this.updateLogos(frameState, imageSource);
|
||||
}
|
||||
|
||||
return !!image;
|
||||
|
||||
@@ -354,7 +354,6 @@ _ol_renderer_webgl_TileLayer_.prototype.prepareFrame = function(frameState, laye
|
||||
}
|
||||
}, this);
|
||||
this.scheduleExpireCache(frameState, tileSource);
|
||||
this.updateLogos(frameState, tileSource);
|
||||
|
||||
var texCoordMatrix = this.texCoordMatrix;
|
||||
_ol_transform_.reset(texCoordMatrix);
|
||||
|
||||
@@ -212,12 +212,9 @@ _ol_renderer_webgl_VectorLayer_.prototype.handleStyleImageChange_ = function(eve
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_renderer_webgl_VectorLayer_.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||
|
||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
var vectorSource = vectorLayer.getSource();
|
||||
|
||||
this.updateLogos(frameState, vectorSource);
|
||||
|
||||
var animating = frameState.viewHints[_ol_ViewHint_.ANIMATING];
|
||||
var interacting = frameState.viewHints[_ol_ViewHint_.INTERACTING];
|
||||
var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
|
||||
|
||||
Reference in New Issue
Block a user