diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index 3a2731c260..3002c1b23f 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -11,6 +11,12 @@ import {getCenter, getIntersection, getHeight, getWidth} from '../extent.js'; import {calculateSourceResolution, render as renderReprojected} from '../reproj.js'; import Triangulation from '../reproj/Triangulation.js'; + +/** + * @typedef {function(module:ol/extent~Extent, number, number) : module:ol/ImageBase~ImageBase} FunctionType + */ + + /** * @classdesc * Class encapsulating single reprojected image. @@ -23,7 +29,7 @@ import Triangulation from '../reproj/Triangulation.js'; * @param {module:ol/extent~Extent} targetExtent Target extent. * @param {number} targetResolution Target resolution. * @param {number} pixelRatio Pixel ratio. - * @param {ol.ReprojImageFunctionType} getImageFunction + * @param {module:ol/reproj/Image~FunctionType} getImageFunction * Function returning source images (extent, resolution, pixelRatio). */ const ReprojImage = function(sourceProj, targetProj, diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index d66fd38c59..dd98c8fb97 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -12,6 +12,12 @@ import {clamp} from '../math.js'; import {calculateSourceResolution, render as renderReprojected} from '../reproj.js'; import Triangulation from '../reproj/Triangulation.js'; + +/** + * @typedef {function(number, number, number, number) : module:ol/Tile~Tile} FunctionType + */ + + /** * @classdesc * Class encapsulating single reprojected tile. @@ -27,7 +33,7 @@ import Triangulation from '../reproj/Triangulation.js'; * @param {module:ol/tilecoord~TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X. * @param {number} pixelRatio Pixel ratio. * @param {number} gutter Gutter of the source tiles. - * @param {ol.ReprojTileFunctionType} getTileFunction + * @param {module:ol/reproj/Tile~FunctionType} getTileFunction * Function returning source tiles (z, x, y, pixelRatio). * @param {number=} opt_errorThreshold Acceptable reprojection error (in px). * @param {boolean=} opt_renderEdges Render reprojection edges. diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index 3e41359e13..bcb6e4d121 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -7,6 +7,14 @@ import {modulo} from '../math.js'; import {getTransform} from '../proj.js'; +/** + * Single triangle; consists of 3 source points and 3 target points. + * @typedef {Object} Triangle + * @property {Array.} source + * @property {Array.} target + */ + + /** * Maximum number of subdivision steps during raster reprojection triangulation. * Prevents high memory usage and large number of proj4 calls (for certain @@ -85,7 +93,7 @@ const Triangulation = function(sourceProj, targetProj, targetExtent, this.errorThresholdSquared_ = errorThreshold * errorThreshold; /** - * @type {Array.} + * @type {Array.} * @private */ this.triangles_ = []; @@ -340,7 +348,7 @@ Triangulation.prototype.calculateSourceExtent = function() { /** - * @return {Array.} Array of the calculated triangles. + * @return {Array.} Array of the calculated triangles. */ Triangulation.prototype.getTriangles = function() { return this.triangles_; diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index a1500d291e..c310d79f04 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -181,27 +181,6 @@ ol.RasterOperation; ol.RegularShapeRenderOptions; -/** - * @typedef {function(module:ol/extent~Extent, number, number) : module:ol/ImageBase~ImageBase} - */ -ol.ReprojImageFunctionType; - - -/** - * @typedef {function(number, number, number, number) : module:ol/Tile~Tile} - */ -ol.ReprojTileFunctionType; - - -/** - * Single triangle; consists of 3 source points and 3 target points. - * - * @typedef {{source: Array., - * target: Array.}} - */ -ol.ReprojTriangle; - - /** * Number of features; bounds/extent. * @typedef {{numberOfFeatures: number,