Module type for ol.source.Tile

This commit is contained in:
Frederic Junod
2018-04-20 14:37:46 +02:00
parent 327bda680d
commit 05f92c0333
8 changed files with 13 additions and 13 deletions

View File

@@ -22,7 +22,7 @@ import {assign} from '../obj.js';
* be visible. * be visible.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0` * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading. * means no preloading.
* @property {ol.source.Tile} [source] Source for this layer. * @property {module:ol/source/Tile~TileSource} [source] Source for this layer.
* @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage * @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for * this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to * temporary layers. The standard way to add a layer to a map and have it managed by the map is to
@@ -84,7 +84,7 @@ TileLayer.prototype.getPreload = function() {
/** /**
* Return the associated {@link ol.source.Tile tilesource} of the layer. * Return the associated {@link ol.source.Tile tilesource} of the layer.
* @function * @function
* @return {ol.source.Tile} Source. * @return {module:ol/source/Tile~TileSource} Source.
* @api * @api
*/ */
TileLayer.prototype.getSource; TileLayer.prototype.getSource;

View File

@@ -55,7 +55,7 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
/** /**
* Create a function that adds loaded tiles to the tile lookup. * Create a function that adds loaded tiles to the tile lookup.
* @param {ol.source.Tile} source Tile source. * @param {module:ol/source/Tile~TileSource} source Tile source.
* @param {module:ol/proj/Projection~Projection} projection Projection of the tiles. * @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
* @param {Object.<number, Object.<string, module:ol/Tile~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 * @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be
@@ -135,13 +135,13 @@ LayerRenderer.prototype.renderIfReadyAndVisible = function() {
/** /**
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @param {ol.source.Tile} tileSource Tile source. * @param {module:ol/source/Tile~TileSource} tileSource Tile source.
* @protected * @protected
*/ */
LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) { LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
if (tileSource.canExpireCache()) { if (tileSource.canExpireCache()) {
/** /**
* @param {ol.source.Tile} tileSource Tile source. * @param {module:ol/source/Tile~TileSource} tileSource Tile source.
* @param {module:ol/PluggableMap~PluggableMap} map Map. * @param {module:ol/PluggableMap~PluggableMap} map Map.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
*/ */
@@ -162,7 +162,7 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
/** /**
* @param {!Object.<string, !Object.<string, module:ol/TileRange~TileRange>>} usedTiles Used tiles. * @param {!Object.<string, !Object.<string, module:ol/TileRange~TileRange>>} usedTiles Used tiles.
* @param {ol.source.Tile} tileSource Tile source. * @param {module:ol/source/Tile~TileSource} tileSource Tile source.
* @param {number} z Z. * @param {number} z Z.
* @param {module:ol/TileRange~TileRange} tileRange Tile range. * @param {module:ol/TileRange~TileRange} tileRange Tile range.
* @protected * @protected
@@ -192,7 +192,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til
* discarded by the tile queue * discarded by the tile queue
* - enqueues missing tiles * - enqueues missing tiles
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @param {ol.source.Tile} tileSource Tile source. * @param {module:ol/source/Tile~TileSource} tileSource Tile source.
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid Tile grid. * @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid Tile grid.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {module:ol/proj/Projection~Projection} projection Projection. * @param {module:ol/proj/Projection~Projection} projection Projection.

View File

@@ -127,7 +127,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState
const viewCenter = viewState.center; const viewCenter = viewState.center;
const tileLayer = this.getLayer(); const tileLayer = this.getLayer();
const tileSource = /** @type {ol.source.Tile} */ (tileLayer.getSource()); const tileSource = /** @type {module:ol/source/Tile~TileSource} */ (tileLayer.getSource());
const sourceRevision = tileSource.getRevision(); const sourceRevision = tileSource.getRevision();
const tileGrid = tileSource.getTileGridForProjection(projection); const tileGrid = tileSource.getTileGridForProjection(projection);
const z = tileGrid.getZForResolution(viewResolution, this.zDirection); const z = tileGrid.getZForResolution(viewResolution, this.zDirection);

View File

@@ -497,7 +497,7 @@ function createImageRenderer(source) {
/** /**
* Create a tile renderer for the provided source. * Create a tile renderer for the provided source.
* @param {ol.source.Tile} source The source. * @param {module:ol/source/Tile~TileSource} source The source.
* @return {ol.renderer.canvas.Layer} The renderer. * @return {ol.renderer.canvas.Layer} The renderer.
*/ */
function createTileRenderer(source) { function createTileRenderer(source) {

View File

@@ -324,7 +324,7 @@ TileSource.prototype.useTile = UNDEFINED;
/** /**
* @classdesc * @classdesc
* Events emitted by {@link ol.source.Tile} instances are instances of this * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this
* type. * type.
* *
* @constructor * @constructor

View File

@@ -92,7 +92,7 @@ LabeledTile.prototype.load = function() {};
* Uses Canvas context2d, so requires Canvas support. * Uses Canvas context2d, so requires Canvas support.
* *
* @constructor * @constructor
* @extends {ol.source.Tile} * @extends {module:ol/source/Tile~TileSource}
* @param {module:ol/source/TileDebug~Options=} options Debug tile options. * @param {module:ol/source/TileDebug~Options=} options Debug tile options.
* @api * @api
*/ */

View File

@@ -271,7 +271,7 @@ CustomTile.prototype.load = function() {
* Layer source for UTFGrid interaction data loaded from TileJSON format. * Layer source for UTFGrid interaction data loaded from TileJSON format.
* *
* @constructor * @constructor
* @extends {ol.source.Tile} * @extends {module:ol/source/Tile~TileSource}
* @param {module:ol/source/TileUTFGrid~Options=} options Source options. * @param {module:ol/source/TileUTFGrid~Options=} options Source options.
* @api * @api
*/ */

View File

@@ -34,7 +34,7 @@ import {getKeyZXY} from '../tilecoord.js';
* @constructor * @constructor
* @abstract * @abstract
* @fires module:ol/source/Tile~TileSourceEvent * @fires module:ol/source/Tile~TileSourceEvent
* @extends {ol.source.Tile} * @extends {module:ol/source/Tile~TileSource}
* @param {module:ol/source/UrlTile~Options=} options Image tile options. * @param {module:ol/source/UrlTile~Options=} options Image tile options.
*/ */
const UrlTile = function(options) { const UrlTile = function(options) {