Remove all inheritDoc tags from src/ol/source

This commit is contained in:
Frederic Junod
2020-03-26 11:37:22 +01:00
parent da8ef43db7
commit 615ae71a8f
19 changed files with 112 additions and 54 deletions

View File

@@ -91,7 +91,9 @@ class Cluster extends VectorSource {
}
/**
* @override
* Remove all features from the source.
* @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.
* @api
*/
clear(opt_fast) {
this.features.length = 0;
@@ -117,7 +119,9 @@ class Cluster extends VectorSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {import("../proj/Projection.js").default} projection Projection.
*/
loadFeatures(extent, resolution, projection) {
this.source.loadFeatures(extent, resolution, projection);
@@ -157,7 +161,6 @@ class Cluster extends VectorSource {
/**
* Handle the source changing.
* @override
*/
refresh() {
this.clear();

View File

@@ -286,7 +286,7 @@ class IIIF extends TileImage {
});
/**
* @inheritDoc
* @type {number}
*/
this.zDirection = options.zDirection;

View File

@@ -120,7 +120,6 @@ class ImageSource extends Source {
/**
* @return {Array<number>} Resolutions.
* @override
*/
getResolutions() {
return this.resolutions_;

View File

@@ -134,7 +134,11 @@ class ImageArcGISRest extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../Image.js").default} Single image.
*/
getImageInternal(extent, resolution, pixelRatio, projection) {

View File

@@ -90,7 +90,11 @@ class ImageCanvasSource extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../ImageCanvas.js").default} Single image.
*/
getImageInternal(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);

View File

@@ -132,7 +132,11 @@ class ImageMapGuide extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../Image.js").default} Single image.
*/
getImageInternal(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);

View File

@@ -86,7 +86,11 @@ class Static extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../Image.js").default} Single image.
*/
getImageInternal(extent, resolution, pixelRatio, projection) {
if (intersects(extent, this.image_.getExtent())) {
@@ -105,7 +109,7 @@ class Static extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../events/Event.js").default} evt Event.
*/
handleImageChange(evt) {
if (this.image_.getState() == ImageState.LOADED) {

View File

@@ -248,7 +248,11 @@ class ImageWMS extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../Image.js").default} Single image.
*/
getImageInternal(extent, resolution, pixelRatio, projection) {

View File

@@ -315,7 +315,11 @@ class RasterSource extends ImageSource {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../ImageCanvas.js").default} Single image.
*/
getImage(extent, resolution, pixelRatio, projection) {
if (!this.allSourcesReady_()) {
@@ -409,7 +413,7 @@ class RasterSource extends ImageSource {
}
/**
* @override
* @return {null} not implemented
*/
getImageInternal() {
return null; // not implemented

View File

@@ -205,7 +205,7 @@ class TileSource extends Source {
}
/**
* @inheritDoc
* @return {Array<number>} Resolutions.
*/
getResolutions() {
return this.tileGrid.getResolutions();

View File

@@ -170,10 +170,12 @@ class TileArcGISRest extends TileImage {
}
/**
* @inheritDoc
* Get the tile pixel ratio for this source.
* @param {number} pixelRatio Pixel ratio.
* @return {number} Tile pixel ratio.
*/
getTilePixelRatio(pixelRatio) {
return this.hidpi_ ? /** @type {number} */ (pixelRatio) : 1;
return this.hidpi_ ? pixelRatio : 1;
}
/**

View File

@@ -68,9 +68,6 @@ class LabeledTile extends Tile {
}
}
/**
* @override
*/
load() {}
}
@@ -118,7 +115,10 @@ class TileDebug extends XYZ {
}
/**
* @inheritDoc
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
* @return {!LabeledTile} Tile.
*/
getTile(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);

View File

@@ -131,7 +131,7 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @return {boolean} Can expire cache.
*/
canExpireCache() {
if (!ENABLE_RASTER_REPROJECTION) {
@@ -150,7 +150,8 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @param {!Object<string, boolean>} usedTiles Used tiles.
*/
expireCache(projection, usedTiles) {
if (!ENABLE_RASTER_REPROJECTION) {
@@ -167,7 +168,8 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {number} Gutter.
*/
getGutterForProjection(projection) {
if (ENABLE_RASTER_REPROJECTION &&
@@ -186,7 +188,8 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {boolean} Opaque.
*/
getOpaque(projection) {
if (ENABLE_RASTER_REPROJECTION &&
@@ -198,7 +201,8 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
*/
getTileGridForProjection(projection) {
if (!ENABLE_RASTER_REPROJECTION) {
@@ -212,14 +216,13 @@ class TileImage extends UrlTile {
if (!(projKey in this.tileGridForProjection)) {
this.tileGridForProjection[projKey] = getTileGridForProjection(projection);
}
return (
/** @type {!import("../tilegrid/TileGrid.js").default} */ (this.tileGridForProjection[projKey])
);
return this.tileGridForProjection[projKey];
}
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../TileCache.js").default} Tile cache.
*/
getTileCacheForProjection(projection) {
if (!ENABLE_RASTER_REPROJECTION) {
@@ -265,10 +268,15 @@ class TileImage extends UrlTile {
}
/**
* @inheritDoc
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {!import("../Tile.js").default} Tile.
*/
getTile(z, x, y, pixelRatio, projection) {
const sourceProjection = /** @type {!import("../proj/Projection.js").default} */ (this.getProjection());
const sourceProjection = this.getProjection();
if (!ENABLE_RASTER_REPROJECTION ||
!sourceProjection || !projection || equivalent(sourceProjection, projection)) {
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);
@@ -278,7 +286,7 @@ class TileImage extends UrlTile {
let tile;
const tileCoordKey = getKey(tileCoord);
if (cache.containsKey(tileCoordKey)) {
tile = /** @type {!import("../Tile.js").default} */ (cache.get(tileCoordKey));
tile = cache.get(tileCoordKey);
}
const key = this.getKey();
if (tile && tile.key == key) {

View File

@@ -260,7 +260,7 @@ class TileWMS extends TileImage {
}
/**
* @inheritDoc
* @return {number} Gutter.
*/
getGutter() {
return this.gutter_;
@@ -349,11 +349,12 @@ class TileWMS extends TileImage {
}
/**
* @inheritDoc
* Get the tile pixel ratio for this source.
* @param {number} pixelRatio Pixel ratio.
* @return {number} Tile pixel ratio.
*/
getTilePixelRatio(pixelRatio) {
return (!this.hidpi_ || this.serverType_ === undefined) ? 1 :
/** @type {number} */ (pixelRatio);
return (!this.hidpi_ || this.serverType_ === undefined) ? 1 : pixelRatio;
}
/**

View File

@@ -162,7 +162,8 @@ export class CustomTile extends Tile {
/**
* @inheritDoc
* Return the key to be used for all tiles in the source.
* @return {string} The key for all tiles.
*/
getKey() {
return this.src_;
@@ -244,7 +245,6 @@ export class CustomTile extends Tile {
/**
* @override
*/
load() {
if (this.preemptive_) {
@@ -467,14 +467,17 @@ class UTFGrid extends TileSource {
/**
* @inheritDoc
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {!CustomTile} Tile.
*/
getTile(z, x, y, pixelRatio, projection) {
const tileCoordKey = getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return (
/** @type {!import("../Tile.js").default} */ (this.tileCache.get(tileCoordKey))
);
return this.tileCache.get(tileCoordKey);
} else {
const tileCoord = [z, x, y];
const urlTileCoord =
@@ -494,7 +497,10 @@ class UTFGrid extends TileSource {
/**
* @inheritDoc
* Marks a tile coord as being used, without triggering a load.
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
*/
useTile(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);

View File

@@ -201,7 +201,10 @@ class UrlTile extends TileSource {
}
/**
* @inheritDoc
* Marks a tile coord as being used, without triggering a load.
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
*/
useTile(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);

View File

@@ -341,14 +341,19 @@ class VectorTile extends UrlTile {
}
/**
* @inheritDoc
* @param {number} z Tile coordinate z.
* @param {number} x Tile coordinate x.
* @param {number} y Tile coordinate y.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {!VectorRenderTile} Tile.
*/
getTile(z, x, y, pixelRatio, projection) {
const coordKey = getKeyZXY(z, x, y);
const key = this.getKey();
let tile;
if (this.tileCache.containsKey(coordKey)) {
tile = /** @type {!import("../Tile.js").default} */ (this.tileCache.get(coordKey));
tile = this.tileCache.get(coordKey);
if (tile.key === key) {
return tile;
}
@@ -395,7 +400,8 @@ class VectorTile extends UrlTile {
}
/**
* @inheritDoc
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {!import("../tilegrid/TileGrid.js").default} Tile grid.
*/
getTileGridForProjection(projection) {
const code = projection.getCode();
@@ -412,14 +418,19 @@ class VectorTile extends UrlTile {
}
/**
* @inheritDoc
* Get the tile pixel ratio for this source.
* @param {number} pixelRatio Pixel ratio.
* @return {number} Tile pixel ratio.
*/
getTilePixelRatio(pixelRatio) {
return pixelRatio;
}
/**
* @inheritDoc
* @param {number} z Z.
* @param {number} pixelRatio Pixel ratio.
* @param {import("../proj/Projection.js").default} projection Projection.
* @return {import("../size.js").Size} Tile size.
*/
getTilePixelSize(z, pixelRatio, projection) {
const tileGrid = this.getTileGridForProjection(projection);

View File

@@ -152,7 +152,7 @@ class WMTS extends TileImage {
/**
* Set the URLs to use for requests.
* URLs may contain OGC conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
* @override
* @param {Array<string>} urls URLs.
*/
setUrls(urls) {
this.urls = urls;

View File

@@ -52,7 +52,8 @@ export class CustomTile extends ImageTile {
}
/**
* @inheritDoc
* Get the image element for this tile.
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
*/
getImage() {
if (this.zoomifyImage_) {
@@ -256,7 +257,7 @@ class Zoomify extends TileImage {
});
/**
* @inheritDoc
* @type {number}
*/
this.zDirection = options.zDirection;