diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index 22412c8c9e..d35eec3a5f 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -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.>} tiles Lookup of loaded - * tiles by zoom level. + * @param {Object.>} 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 diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index f0ecb44b33..d60ee1892f 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -48,7 +48,7 @@ const CanvasTileLayerRenderer = function(tileLayer) { /** * @protected - * @type {!Array.} + * @type {!Array.} */ 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.>} + * @type {Object.>} */ 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. diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index e235de993a..027f24e44d 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -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) { diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js index 934f83c052..a12698e985 100644 --- a/src/ol/renderer/webgl/TileLayer.js +++ b/src/ol/renderer/webgl/TileLayer.js @@ -242,7 +242,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState, gl.uniform1i(this.locations_.u_texture, 0); /** - * @type {Object.>} + * @type {Object.>} */ 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 && diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index a5737a05f6..d66fd38c59 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -18,7 +18,7 @@ import Triangulation from '../reproj/Triangulation.js'; * See {@link ol.source.TileImage}. * * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/proj/Projection~Projection} sourceProj Source projection. * @param {module:ol/tilegrid/TileGrid~TileGrid} sourceTileGrid Source tile grid. * @param {module:ol/proj/Projection~Projection} targetProj Target projection. @@ -82,7 +82,7 @@ const ReprojTile = function(sourceProj, sourceTileGrid, /** * @private - * @type {!Array.} + * @type {!Array.} */ this.sourceTiles_ = []; diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index 6124326da7..c3aca84a9d 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -106,7 +106,7 @@ TileSource.prototype.expireCache = function(projection, usedTiles) { * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} z Zoom level. * @param {module:ol/TileRange~TileRange} tileRange Tile range. - * @param {function(ol.Tile):(boolean|undefined)} callback Called with each + * @param {function(module:ol/Tile~Tile):(boolean|undefined)} callback Called with each * loaded tile. If the callback returns `false`, the tile will not be * considered loaded. * @return {boolean} The tile range is fully covered with loaded tiles. @@ -124,7 +124,7 @@ TileSource.prototype.forEachLoadedTile = function(projection, z, tileRange, call tileCoordKey = getKeyZXY(z, x, y); loaded = false; if (tileCache.containsKey(tileCoordKey)) { - tile = /** @type {!ol.Tile} */ (tileCache.get(tileCoordKey)); + tile = /** @type {!module:ol/Tile~Tile} */ (tileCache.get(tileCoordKey)); loaded = tile.getState() === TileState.LOADED; if (loaded) { loaded = (callback(tile) !== false); @@ -195,7 +195,7 @@ TileSource.prototype.getResolutions = function() { * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. */ TileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {}; @@ -316,7 +316,7 @@ TileSource.prototype.useTile = UNDEFINED; * @extends {ol.events.Event} * @implements {oli.source.Tile.Event} * @param {string} type Type. - * @param {ol.Tile} tile The tile. + * @param {module:ol/Tile~Tile} tile The tile. */ export const TileSourceEvent = function(type, tile) { @@ -324,7 +324,7 @@ export const TileSourceEvent = function(type, tile) { /** * The tile related to the event. - * @type {ol.Tile} + * @type {module:ol/Tile~Tile} * @api */ this.tile = tile; diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js index 1c5144f6c1..5860b67ed3 100644 --- a/src/ol/source/TileDebug.js +++ b/src/ol/source/TileDebug.js @@ -12,7 +12,7 @@ import {getKeyZXY} from '../tilecoord.js'; /** * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/size~Size} tileSize Tile size. * @param {string} text Text. diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 5fe03a95e4..f4c5dada73 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -206,7 +206,7 @@ TileImage.prototype.getTileCacheForProjection = function(projection) { * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {string} key The key set on the tile. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. * @private */ TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) { @@ -243,7 +243,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { let tile; const tileCoordKey = getKey(tileCoord); if (cache.containsKey(tileCoordKey)) { - tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey)); + tile = /** @type {!module:ol/Tile~Tile} */ (cache.get(tileCoordKey)); } const key = this.getKey(); if (tile && tile.key == key) { @@ -283,7 +283,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. * @param {!module:ol/proj/Projection~Projection} projection Projection. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. * @protected */ TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) { diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js index f8f227fdae..b13c6d4300 100644 --- a/src/ol/source/TileUTFGrid.js +++ b/src/ol/source/TileUTFGrid.js @@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; /** * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/TileState~TileState} state State. * @param {string} src Image source URI. @@ -449,7 +449,7 @@ UTFGrid.prototype.handleTileJSONResponse = function(tileJSON) { UTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey)); + return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey)); } else { const tileCoord = [z, x, y]; const urlTileCoord = diff --git a/src/ol/source/UrlTile.js b/src/ol/source/UrlTile.js index 70f0904957..42a7e5b170 100644 --- a/src/ol/source/UrlTile.js +++ b/src/ol/source/UrlTile.js @@ -116,7 +116,7 @@ UrlTile.prototype.getUrls = function() { * @protected */ UrlTile.prototype.handleTileChange = function(event) { - const tile = /** @type {ol.Tile} */ (event.target); + const tile = /** @type {module:ol/Tile~Tile} */ (event.target); const uid = getUid(tile); const tileState = tile.getState(); let type; diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index 6a9c47487a..ebccee5377 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -112,7 +112,7 @@ VectorTileSource.prototype.clear = function() { VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey)); + return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey)); } else { const tileCoord = [z, x, y]; const urlTileCoord = this.getTileCoordForTileUrlFunction( diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index aeb4b1c364..8ab6e95cb3 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -242,7 +242,7 @@ ol.ReprojImageFunctionType; /** - * @typedef {function(number, number, number, number) : ol.Tile} + * @typedef {function(number, number, number, number) : module:ol/Tile~Tile} */ ol.ReprojTileFunctionType;