Module type for ol.Tile
This commit is contained in:
@@ -57,11 +57,9 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
|
||||
* Create a function that adds loaded tiles to the tile lookup.
|
||||
* @param {ol.source.Tile} source Tile source.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
|
||||
* @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
|
||||
* tiles by zoom level.
|
||||
* @param {Object.<number, Object.<string, module:ol/Tile~Tile>>} tiles Lookup of loaded tiles by zoom level.
|
||||
* @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be
|
||||
* called with a zoom level and a tile range to add loaded tiles to the
|
||||
* lookup.
|
||||
* called with a zoom level and a tile range to add loaded tiles to the lookup.
|
||||
* @protected
|
||||
*/
|
||||
LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
|
||||
@@ -201,7 +199,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
* @param {number} currentZ Current Z.
|
||||
* @param {number} preload Load low resolution tiles up to 'preload' levels.
|
||||
* @param {function(this: T, ol.Tile)=} opt_tileCallback Tile callback.
|
||||
* @param {function(this: T, module:ol/Tile~Tile)=} opt_tileCallback Tile callback.
|
||||
* @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.
|
||||
* @protected
|
||||
* @template T
|
||||
|
||||
@@ -48,7 +48,7 @@ const CanvasTileLayerRenderer = function(tileLayer) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @type {!Array.<ol.Tile>}
|
||||
* @type {!Array.<module:ol/Tile~Tile>}
|
||||
*/
|
||||
this.renderedTiles = [];
|
||||
|
||||
@@ -105,7 +105,7 @@ CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {ol.Tile} tile Tile.
|
||||
* @param {module:ol/Tile~Tile} tile Tile.
|
||||
* @return {boolean} Tile is drawable.
|
||||
*/
|
||||
CanvasTileLayerRenderer.prototype.isDrawableTile_ = function(tile) {
|
||||
@@ -151,7 +151,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState
|
||||
const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);
|
||||
|
||||
/**
|
||||
* @type {Object.<number, Object.<string, ol.Tile>>}
|
||||
* @type {Object.<number, Object.<string, module:ol/Tile~Tile>>}
|
||||
*/
|
||||
const tilesToDrawByZ = {};
|
||||
tilesToDrawByZ[z] = {};
|
||||
@@ -298,7 +298,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Tile} tile Tile.
|
||||
* @param {module:ol/Tile~Tile} tile Tile.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {module:ol/layer/Layer~State} layerState Layer state.
|
||||
* @param {number} x Left of the tile.
|
||||
|
||||
@@ -136,7 +136,7 @@ const WebGLMapRenderer = function(container, map) {
|
||||
* @return {string} Key.
|
||||
*/
|
||||
function(element) {
|
||||
return /** @type {ol.Tile} */ (element[0]).getKey();
|
||||
return /** @type {module:ol/Tile~Tile} */ (element[0]).getKey();
|
||||
});
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ const WebGLMapRenderer = function(container, map) {
|
||||
if (!this.tileTextureQueue_.isEmpty()) {
|
||||
this.tileTextureQueue_.reprioritize();
|
||||
const element = this.tileTextureQueue_.dequeue();
|
||||
const tile = /** @type {ol.Tile} */ (element[0]);
|
||||
const tile = /** @type {module:ol/Tile~Tile} */ (element[0]);
|
||||
const tileSize = /** @type {module:ol/size~Size} */ (element[3]);
|
||||
const tileGutter = /** @type {number} */ (element[4]);
|
||||
this.bindTileTexture(
|
||||
@@ -195,7 +195,7 @@ WebGLMapRenderer['create'] = function(container, map) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Tile} tile Tile.
|
||||
* @param {module:ol/Tile~Tile} tile Tile.
|
||||
* @param {module:ol/size~Size} tileSize Tile size.
|
||||
* @param {number} tileGutter Tile gutter.
|
||||
* @param {number} magFilter Mag filter.
|
||||
@@ -409,7 +409,7 @@ WebGLMapRenderer.prototype.initializeGL_ = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Tile} tile Tile.
|
||||
* @param {module:ol/Tile~Tile} tile Tile.
|
||||
* @return {boolean} Is tile texture loaded.
|
||||
*/
|
||||
WebGLMapRenderer.prototype.isTileTextureLoaded = function(tile) {
|
||||
|
||||
@@ -242,7 +242,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
|
||||
gl.uniform1i(this.locations_.u_texture, 0);
|
||||
|
||||
/**
|
||||
* @type {Object.<number, Object.<string, ol.Tile>>}
|
||||
* @type {Object.<number, Object.<string, module:ol/Tile~Tile>>}
|
||||
*/
|
||||
const tilesToDrawByZ = {};
|
||||
tilesToDrawByZ[z] = {};
|
||||
@@ -344,7 +344,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
|
||||
frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,
|
||||
tileLayer.getPreload(),
|
||||
/**
|
||||
* @param {ol.Tile} tile Tile.
|
||||
* @param {module:ol/Tile~Tile} tile Tile.
|
||||
*/
|
||||
function(tile) {
|
||||
if (tile.getState() == TileState.LOADED &&
|
||||
|
||||
Reference in New Issue
Block a user