diff --git a/examples/d3.js b/examples/d3.js index 193afd771f..050100bc18 100644 --- a/examples/d3.js +++ b/examples/d3.js @@ -37,7 +37,7 @@ d3.json('data/topojson/us.json', function(error, us) { * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. * @param {ol.Size} size Size. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {HTMLCanvasElement} A canvas element. */ const canvasFunction = function(extent, resolution, pixelRatio, size, projection) { diff --git a/examples/wms-custom-proj.js b/examples/wms-custom-proj.js index 80bf4e5cc2..8f80e487de 100644 --- a/examples/wms-custom-proj.js +++ b/examples/wms-custom-proj.js @@ -10,7 +10,7 @@ import TileWMS from '../src/ol/source/TileWMS.js'; // By default OpenLayers does not know about the EPSG:21781 (Swiss) projection. // So we create a projection instance for EPSG:21781 and pass it to -// ol.proj.addProjection to make it available to the library for lookup by its +// ol/proj~addProjection to make it available to the library for lookup by its // code. const projection = new Projection({ @@ -23,7 +23,7 @@ const projection = new Projection({ addProjection(projection); // We also declare EPSG:21781/EPSG:4326 transform functions. These functions -// are necessary for the ScaleLine control and when calling ol.proj.transform +// are necessary for the ScaleLine control and when calling ol/proj~transform // for setting the view's initial center (see below). addCoordinateTransforms('EPSG:4326', projection, diff --git a/externs/oli.js b/externs/oli.js index dfaf33c7dd..57a93bcbcf 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -254,7 +254,7 @@ oli.interaction.DragAndDropEvent.prototype.features; /** - * @type {ol.proj.Projection|undefined} + * @type {module:ol/proj/Projection~Projection|undefined} */ oli.interaction.DragAndDropEvent.prototype.projection; diff --git a/externs/olx.js b/externs/olx.js index b35f5c1b43..346e1563ad 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2885,7 +2885,7 @@ olx.source.ImageCanvasOptions.prototype.attributions; * Canvas function. The function returning the canvas element used by the source * as an image. The arguments passed to the function are: `{ol.Extent}` the * image extent, `{number}` the image resolution, `{number}` the device pixel - * ratio, `{ol.Size}` the image size, and `{ol.proj.Projection}` the image + * ratio, `{ol.Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image * projection. The canvas returned by this function is cached by the source. If * the value returned by the function is later changed then * `dispatchChangeEvent` should be called on the source for the source to @@ -5385,7 +5385,7 @@ olx.tilegrid.XYZOptions.prototype.tileSize; /** * @typedef {{center: ol.Coordinate, - * projection: ol.proj.Projection, + * projection: module:ol/proj/Projection~Projection, * resolution: number, * rotation: number, * zoom: number}} @@ -5401,7 +5401,7 @@ olx.ViewState.prototype.center; /** - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} * @api */ olx.ViewState.prototype.projection; diff --git a/externs/xol.js b/externs/xol.js index c67d807fb3..ce10605ab1 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -755,7 +755,7 @@ * @property {ol.CanvasFunctionType} canvasFunction Canvas function. The function returning the canvas element used by the source * as an image. The arguments passed to the function are: `{ol.Extent}` the * image extent, `{number}` the image resolution, `{number}` the device pixel - * ratio, `{ol.Size}` the image size, and `{ol.proj.Projection}` the image + * ratio, `{ol.Size}` the image size, and `{module:ol/proj/Projection~Projection}` the image * projection. The canvas returned by this function is cached by the source. If * the value returned by the function is later changed then * `dispatchChangeEvent` should be called on the source for the source to @@ -1453,7 +1453,7 @@ /** * @typedef {Object} ViewState * @property {ol.Coordinate} center - * @property {ol.proj.Projection} projection + * @property {module:ol/proj/Projection~Projection} projection * @property {number} resolution * @property {number} rotation * @property {number} zoom The current zoom level. diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 5fc94ade3c..43a4c30cb1 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -89,7 +89,7 @@ const MousePosition = function(opt_options) { /** * @private - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.mapProjection_ = null; @@ -153,13 +153,13 @@ MousePosition.prototype.getCoordinateFormat = function() { /** * Return the projection that is used to report the mouse position. - * @return {ol.proj.Projection|undefined} The projection to report mouse + * @return {module:ol/proj/Projection~Projection|undefined} The projection to report mouse * position in. * @observable * @api */ MousePosition.prototype.getProjection = function() { - return /** @type {ol.proj.Projection|undefined} */ (this.get(PROJECTION)); + return /** @type {module:ol/proj/Projection~Projection|undefined} */ (this.get(PROJECTION)); }; diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 2084169ba4..540878db28 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -500,7 +500,7 @@ EsriJSON.prototype.readGeometryFromObject = function(object, opt_options) { * * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ EsriJSON.prototype.readProjection; diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index c270663e25..fbc6a4969f 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -64,13 +64,13 @@ const FeatureFormat = function() { /** * @protected - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.defaultDataProjection = null; /** * @protected - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.defaultFeatureProjection = null; @@ -168,7 +168,7 @@ FeatureFormat.prototype.readGeometry = function(source, opt_options) {}; * * @abstract * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ FeatureFormat.prototype.readProjection = function(source) {}; diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index 8d75f983bd..d428bb1eec 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -705,7 +705,7 @@ GPX.prototype.readFeaturesFromNode = function(node, opt_options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ GPX.prototype.readProjection; diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index b3333e7e9c..2de79e91ad 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -438,7 +438,7 @@ GeoJSON.prototype.readGeometryFromObject = function(object, opt_options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ GeoJSON.prototype.readProjection; @@ -460,7 +460,7 @@ GeoJSON.prototype.readProjectionFromObject = function(object) { } else { projection = this.defaultDataProjection; } - return /** @type {ol.proj.Projection} */ (projection); + return /** @type {module:ol/proj/Projection~Projection} */ (projection); }; diff --git a/src/ol/format/IGC.js b/src/ol/format/IGC.js index ab0a1edac7..52515276be 100644 --- a/src/ol/format/IGC.js +++ b/src/ol/format/IGC.js @@ -209,7 +209,7 @@ IGC.prototype.readFeaturesFromText = function(text, opt_options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ IGC.prototype.readProjection; diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index c4094f8183..0b776d75a1 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -115,7 +115,7 @@ JSONFeature.prototype.readProjection = function(source) { * @abstract * @param {Object} object Object. * @protected - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ JSONFeature.prototype.readProjectionFromObject = function(object) {}; diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 90e218a2bf..2470fd18b2 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -2061,7 +2061,7 @@ KML.prototype.readRegionFromNode = function(node) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ KML.prototype.readProjection; diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 776b6a4ff4..0b29f442e7 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -54,7 +54,7 @@ const MVT = function(opt_options) { const options = opt_options ? opt_options : {}; /** - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.defaultDataProjection = new Projection({ code: '', diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index 353935ae0e..517f6e0db3 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -201,7 +201,7 @@ OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ OSMXML.prototype.readProjection; diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index 36cf9e154f..2f5199dbaa 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -342,7 +342,7 @@ Polyline.prototype.readGeometryFromText = function(text, opt_options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ Polyline.prototype.readProjection; diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index ac28183b81..ba6b20a821 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -108,7 +108,7 @@ TextFeature.prototype.readProjection = function(source) { /** * @param {string} text Text. * @protected - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ TextFeature.prototype.readProjectionFromText = function(text) { return this.defaultDataProjection; diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 0fd2a33504..aff9581c0a 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -406,7 +406,7 @@ function transformVertex(vertex, scale, translate) { * Read the projection from a TopoJSON source. * * @param {Document|Node|Object|string} object Source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @override * @api */ diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js index 295e982db8..5bd5a6bd86 100644 --- a/src/ol/format/WFS.js +++ b/src/ol/format/WFS.js @@ -1069,7 +1069,7 @@ WFS.prototype.writeTransaction = function(inserts, updates, deletes, options) { * * @function * @param {Document|Node|Object|string} source Source. - * @return {?ol.proj.Projection} Projection. + * @return {?module:ol/proj/Projection~Projection} Projection. * @api */ WFS.prototype.readProjection; diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 2eba7165cd..8967fd02b6 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -187,7 +187,7 @@ XMLFeature.prototype.readProjection = function(source) { /** * @param {Document} doc Document. * @protected - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ XMLFeature.prototype.readProjectionFromDocument = function(doc) { return this.defaultDataProjection; @@ -197,7 +197,7 @@ XMLFeature.prototype.readProjectionFromDocument = function(doc) { /** * @param {Node} node Node. * @protected - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ XMLFeature.prototype.readProjectionFromNode = function(node) { return this.defaultDataProjection; diff --git a/src/ol/geom/Circle.js b/src/ol/geom/Circle.js index 600ccf1cc8..93ed0bdb6c 100644 --- a/src/ol/geom/Circle.js +++ b/src/ol/geom/Circle.js @@ -251,9 +251,9 @@ Circle.prototype.setRadius = function(radius) { * of the original circle. * * @param {module:ol/proj~ProjectionLike} source The current projection. Can be a - * string identifier or a {@link ol.proj.Projection} object. + * string identifier or a {@link module:ol/proj/Projection~Projection} object. * @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a - * string identifier or a {@link ol.proj.Projection} object. + * string identifier or a {@link module:ol/proj/Projection~Projection} object. * @return {module:ol/geom/Circle~Circle} This geometry. Note that original geometry is * modified in place. * @function diff --git a/src/ol/geom/Geometry.js b/src/ol/geom/Geometry.js index 65d30e5413..cdcb3f0b02 100644 --- a/src/ol/geom/Geometry.js +++ b/src/ol/geom/Geometry.js @@ -246,9 +246,9 @@ Geometry.prototype.translate = function(deltaX, deltaY) {}; * then use this function on the clone. * * @param {module:ol/proj~ProjectionLike} source The current projection. Can be a - * string identifier or a {@link ol.proj.Projection} object. + * string identifier or a {@link module:ol/proj/Projection~Projection} object. * @param {module:ol/proj~ProjectionLike} destination The desired projection. Can be a - * string identifier or a {@link ol.proj.Projection} object. + * string identifier or a {@link module:ol/proj/Projection~Projection} object. * @return {module:ol/geom/Geometry~Geometry} This geometry. Note that original geometry is * modified in place. * @api diff --git a/src/ol/geom/flat/geodesic.js b/src/ol/geom/flat/geodesic.js index 0069a54a3c..8de234b33d 100644 --- a/src/ol/geom/flat/geodesic.js +++ b/src/ol/geom/flat/geodesic.js @@ -84,7 +84,7 @@ function line(interpolate, transform, squaredTolerance) { * @param {number} lat1 Latitude 1 in degrees. * @param {number} lon2 Longitude 2 in degrees. * @param {number} lat2 Latitude 2 in degrees. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. * @return {Array.} Flat coordinates. */ @@ -128,7 +128,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera * @param {number} lon Longitude. * @param {number} lat1 Latitude 1. * @param {number} lat2 Latitude 2. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. * @return {Array.} Flat coordinates. */ @@ -151,7 +151,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) { * @param {number} lat Latitude. * @param {number} lon1 Longitude 1. * @param {number} lon2 Longitude 2. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. * @return {Array.} Flat coordinates. */ diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 4160e2d633..f8ce08c2d8 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -36,7 +36,7 @@ const DragAndDropEventType = { * @param {ol.interaction.DragAndDropEventType} type Type. * @param {File} file File. * @param {Array.=} opt_features Features. - * @param {ol.proj.Projection=} opt_projection Projection. + * @param {module:ol/proj/Projection~Projection=} opt_projection Projection. */ const DragAndDropEvent = function(type, file, opt_features, opt_projection) { @@ -58,7 +58,7 @@ const DragAndDropEvent = function(type, file, opt_features, opt_projection) { /** * The feature projection. - * @type {ol.proj.Projection|undefined} + * @type {module:ol/proj/Projection~Projection|undefined} * @api */ this.projection = opt_projection; @@ -94,7 +94,7 @@ const DragAndDrop = function(opt_options) { /** * @private - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.projection_ = options.projection ? getProjection(options.projection) : null; diff --git a/src/ol/proj/Projection.js b/src/ol/proj/Projection.js index 5829dbb780..0bc8d41822 100644 --- a/src/ol/proj/Projection.js +++ b/src/ol/proj/Projection.js @@ -7,7 +7,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js'; /** * @typedef {Object} Options * @property {string} code The SRS identifier code, e.g. `EPSG:4326`. - * @property {ol.proj.Units|string|undefined} units Units. Required unless a + * @property {module:ol/proj/Units~Units|string|undefined} units Units. Required unless a * proj4 projection is defined for `code`. * @property {ol.Extent|undefined} extent The validity extent for the SRS. * @property {string|undefined} axisOrientation The axis orientation as specified @@ -15,7 +15,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js'; * @property {boolean|undefined} global Whether the projection is valid for the * whole globe. Default is `false`. * @property {number|undefined} metersPerUnit The meters per unit for the SRS. - * If not provided, the `units` are used to get the meters per unit from the {@link ol.proj.METERS_PER_UNIT} + * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT} * lookup table. * @property {ol.Extent|undefined} worldExtent The world extent for the SRS. * @property {(function(number, ol.Coordinate):number|undefined)} getPointResolution @@ -34,7 +34,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js'; * and options use {@link module:ol/proj~ProjectionLike} which means the simple string * code will suffice. * - * You can use {@link ol.proj.get} to retrieve the object for a particular + * You can use {@link module:ol/proj~get} to retrieve the object for a particular * projection. * * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together @@ -49,7 +49,7 @@ import {METERS_PER_UNIT} from '../proj/Units.js'; * * If you use proj4js, aliases can be added using `proj4.defs()`; see * [documentation](https://github.com/proj4js/proj4js). To set an alternative - * namespace for proj4, use {@link ol.proj.setProj4}. + * namespace for proj4, use {@link module:ol/proj~setProj4}. * * @constructor * @param {module:ol/proj/Projection~Options} options Projection options. @@ -64,17 +64,17 @@ const Projection = function(options) { this.code_ = options.code; /** - * Units of projected coordinates. When set to `ol.proj.Units.TILE_PIXELS`, a + * Units of projected coordinates. When set to `TILE_PIXELS`, a * `this.extent_` and `this.worldExtent_` must be configured properly for each * tile. * @private - * @type {ol.proj.Units} + * @type {module:ol/proj/Units~Units} */ - this.units_ = /** @type {ol.proj.Units} */ (options.units); + this.units_ = /** @type {module:ol/proj/Units~Units} */ (options.units); /** * Validity extent of the projection in projected coordinates. For projections - * with `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in + * with `TILE_PIXELS` units, this is the extent of the tile in * tile pixel space. * @private * @type {module:ol/extent~Extent} @@ -83,7 +83,7 @@ const Projection = function(options) { /** * Extent of the world in EPSG:4326. For projections with - * `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in + * `TILE_PIXELS` units, this is the extent of the tile in * projected coordinate space. * @private * @type {module:ol/extent~Extent} @@ -160,7 +160,7 @@ Projection.prototype.getExtent = function() { /** * Get the units of this projection. - * @return {ol.proj.Units} Units. + * @return {module:ol/proj/Units~Units} Units. * @api */ Projection.prototype.getUnits = function() { diff --git a/src/ol/proj/Units.js b/src/ol/proj/Units.js index 25b8041517..5a88c1b577 100644 --- a/src/ol/proj/Units.js +++ b/src/ol/proj/Units.js @@ -20,7 +20,7 @@ const Units = { /** * Meters per unit lookup table. * @const - * @type {Object.} + * @type {Object.} * @api */ export const METERS_PER_UNIT = {}; diff --git a/src/ol/proj/epsg3857.js b/src/ol/proj/epsg3857.js index 8c77b0a4c9..bae62a45fc 100644 --- a/src/ol/proj/epsg3857.js +++ b/src/ol/proj/epsg3857.js @@ -45,7 +45,7 @@ export const WORLD_EXTENT = [-180, -85, 180, 85]; * Projection object for web/spherical Mercator (EPSG:3857). * * @constructor - * @extends {ol.proj.Projection} + * @extends {module:ol/proj/Projection~Projection} * @param {string} code Code. */ function EPSG3857Projection(code) { @@ -67,7 +67,7 @@ inherits(EPSG3857Projection, Projection); * Projections equal to EPSG:3857. * * @const - * @type {Array.} + * @type {Array.} */ export const PROJECTIONS = [ new EPSG3857Projection('EPSG:3857'), diff --git a/src/ol/proj/epsg4326.js b/src/ol/proj/epsg4326.js index dc0b7c3d9a..a5d0b17a38 100644 --- a/src/ol/proj/epsg4326.js +++ b/src/ol/proj/epsg4326.js @@ -40,7 +40,7 @@ export const METERS_PER_UNIT = Math.PI * RADIUS / 180; * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates. * * @constructor - * @extends {ol.proj.Projection} + * @extends {module:ol/proj/Projection~Projection} * @param {string} code Code. * @param {string=} opt_axisOrientation Axis orientation. */ @@ -62,7 +62,7 @@ inherits(EPSG4326Projection, Projection); * Projections equal to EPSG:4326. * * @const - * @type {Array.} + * @type {Array.} */ export const PROJECTIONS = [ new EPSG4326Projection('CRS:84'), diff --git a/src/ol/proj/projections.js b/src/ol/proj/projections.js index 496b335a29..7e5e6fe7a0 100644 --- a/src/ol/proj/projections.js +++ b/src/ol/proj/projections.js @@ -4,7 +4,7 @@ /** - * @type {Object.} + * @type {Object.} */ let cache = {}; @@ -20,7 +20,7 @@ export function clear() { /** * Get a cached projection by code. * @param {string} code The code for the projection. - * @return {ol.proj.Projection} The projection (if cached). + * @return {module:ol/proj/Projection~Projection} The projection (if cached). */ export function get(code) { return cache[code] || null; @@ -30,7 +30,7 @@ export function get(code) { /** * Add a projection to the cache. * @param {string} code The projection code. - * @param {ol.proj.Projection} projection The projection to cache. + * @param {module:ol/proj/Projection~Projection} projection The projection to cache. */ export function add(code, projection) { cache[code] = projection; diff --git a/src/ol/proj/transforms.js b/src/ol/proj/transforms.js index c73cd8fd1a..ae7dc98a00 100644 --- a/src/ol/proj/transforms.js +++ b/src/ol/proj/transforms.js @@ -23,8 +23,8 @@ export function clear() { * Registers a conversion function to convert coordinates from the source * projection to the destination projection. * - * @param {ol.proj.Projection} source Source. - * @param {ol.proj.Projection} destination Destination. + * @param {module:ol/proj/Projection~Projection} source Source. + * @param {module:ol/proj/Projection~Projection} destination Destination. * @param {module:ol/proj~TransformFunction} transformFn Transform. */ export function add(source, destination, transformFn) { @@ -42,8 +42,8 @@ export function add(source, destination, transformFn) { * projection to the destination projection. This method is used to clean up * cached transforms during testing. * - * @param {ol.proj.Projection} source Source projection. - * @param {ol.proj.Projection} destination Destination projection. + * @param {module:ol/proj/Projection~Projection} source Source projection. + * @param {module:ol/proj/Projection~Projection} destination Destination projection. * @return {module:ol/proj~TransformFunction} transformFn The unregistered transform. */ export function remove(source, destination) { diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index de168794c7..4707e81df4 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -56,7 +56,7 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE; /** * Create a function that adds loaded tiles to the tile lookup. * @param {ol.source.Tile} source Tile source. - * @param {ol.proj.Projection} projection Projection of the tiles. + * @param {module:ol/proj/Projection~Projection} projection Projection of the tiles. * @param {Object.>} tiles Lookup of loaded * tiles by zoom level. * @return {function(number, ol.TileRange):boolean} A function that can be @@ -198,7 +198,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til * @param {ol.source.Tile} tileSource Tile source. * @param {ol.tilegrid.TileGrid} tileGrid Tile grid. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {module:ol/extent~Extent} extent Extent. * @param {number} currentZ Current Z. * @param {number} preload Load low resolution tiles up to 'preload' levels. diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index 311cb59a7f..cc8b62819c 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -18,8 +18,8 @@ import Triangulation from '../reproj/Triangulation.js'; * * @constructor * @extends {ol.ImageBase} - * @param {ol.proj.Projection} sourceProj Source projection (of the data). - * @param {ol.proj.Projection} targetProj Target projection. + * @param {module:ol/proj/Projection~Projection} sourceProj Source projection (of the data). + * @param {module:ol/proj/Projection~Projection} targetProj Target projection. * @param {module:ol/extent~Extent} targetExtent Target extent. * @param {number} targetResolution Target resolution. * @param {number} pixelRatio Pixel ratio. @@ -31,7 +31,7 @@ const ReprojImage = function(sourceProj, targetProj, /** * @private - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.targetProj_ = targetProj; @@ -132,7 +132,7 @@ ReprojImage.prototype.getImage = function() { /** - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. */ ReprojImage.prototype.getProjection = function() { return this.targetProj_; diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index e54fb0c5ea..41ead2111b 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -19,9 +19,9 @@ import Triangulation from '../reproj/Triangulation.js'; * * @constructor * @extends {ol.Tile} - * @param {ol.proj.Projection} sourceProj Source projection. + * @param {module:ol/proj/Projection~Projection} sourceProj Source projection. * @param {ol.tilegrid.TileGrid} sourceTileGrid Source tile grid. - * @param {ol.proj.Projection} targetProj Target projection. + * @param {module:ol/proj/Projection~Projection} targetProj Target projection. * @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid. * @param {module:ol/tilecoord~TileCoord} tileCoord Coordinate of the tile. * @param {module:ol/tilecoord~TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X. diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index a9c7c2a114..3e41359e13 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -33,8 +33,8 @@ const MAX_TRIANGLE_WIDTH = 0.25; * Class containing triangulation of the given target extent. * Used for determining source data and the reprojection itself. * - * @param {ol.proj.Projection} sourceProj Source projection. - * @param {ol.proj.Projection} targetProj Target projection. + * @param {module:ol/proj/Projection~Projection} sourceProj Source projection. + * @param {module:ol/proj/Projection~Projection} targetProj Target projection. * @param {module:ol/extent~Extent} targetExtent Target extent to triangulate. * @param {module:ol/extent~Extent} maxSourceExtent Maximal source extent that can be used. * @param {number} errorThreshold Acceptable error (in source units). @@ -44,13 +44,13 @@ const Triangulation = function(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold) { /** - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} * @private */ this.sourceProj_ = sourceProj; /** - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} * @private */ this.targetProj_ = targetProj; diff --git a/src/ol/source/BingMaps.js b/src/ol/source/BingMaps.js index e062301ca4..baff2adf0c 100644 --- a/src/ol/source/BingMaps.js +++ b/src/ol/source/BingMaps.js @@ -151,7 +151,7 @@ BingMaps.prototype.handleImageryMetadataResponse = function(response) { /** * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {string|undefined} Tile URL. */ function(tileCoord, pixelRatio, projection) { diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index bfe21ea3b1..4dd3e3da6c 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -139,7 +139,7 @@ ImageSource.prototype.findNearestResolution = function(resolution) { * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {ol.ImageBase} Single image. */ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projection) { @@ -183,7 +183,7 @@ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projec * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {ol.ImageBase} Single image. * @protected */ diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index e25b39b183..3b4b968ab7 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -195,7 +195,7 @@ ImageArcGISRest.prototype.getImageLoadFunction = function() { * @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/size~Size} size Size. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {Object} params Params. * @return {string} Request URL. * @private diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index cb3c490683..5d4cc0c010 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -203,7 +203,7 @@ ImageMapGuide.prototype.updateParams = function(params) { * @param {Object.} params Request parameters. * @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/size~Size} size Size. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {string} The mapagent map image request URL. */ ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) { diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index 47723e4058..2f783fb951 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -257,7 +257,7 @@ ImageWMS.prototype.getImageLoadFunction = function() { * @param {module:ol/extent~Extent} extent Extent. * @param {module:ol/size~Size} size Size. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {Object} params Params. * @return {string} Request URL. * @private diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index b25045c5a2..4b61584cb2 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -224,7 +224,7 @@ RasterSource.prototype.setOperation = function(operation, opt_lib) { * Update the stored frame state. * @param {module:ol/extent~Extent} extent The view extent (in map units). * @param {number} resolution The view resolution. - * @param {ol.proj.Projection} projection The view projection. + * @param {module:ol/proj/Projection~Projection} projection The view projection. * @return {olx.FrameState} The updated frame state. * @private */ diff --git a/src/ol/source/Source.js b/src/ol/source/Source.js index 3f0dda1712..a34d72f2e8 100644 --- a/src/ol/source/Source.js +++ b/src/ol/source/Source.js @@ -28,7 +28,7 @@ const Source = function(options) { /** * @private - * @type {ol.proj.Projection} + * @type {module:ol/proj/Projection~Projection} */ this.projection_ = getProjection(options.projection); @@ -104,7 +104,7 @@ Source.prototype.getAttributions = function() { /** * Get the projection of the source. - * @return {ol.proj.Projection} Projection. + * @return {module:ol/proj/Projection~Projection} Projection. * @api */ Source.prototype.getProjection = function() { diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index 74f8fe9d3a..2e17408890 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -91,7 +91,7 @@ TileSource.prototype.canExpireCache = function() { /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {Object.} usedTiles Used tiles. */ TileSource.prototype.expireCache = function(projection, usedTiles) { @@ -103,7 +103,7 @@ TileSource.prototype.expireCache = function(projection, usedTiles) { /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} z Zoom level. * @param {ol.TileRange} tileRange Tile range. * @param {function(ol.Tile):(boolean|undefined)} callback Called with each @@ -140,7 +140,7 @@ TileSource.prototype.forEachLoadedTile = function(projection, z, tileRange, call /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {number} Gutter. */ TileSource.prototype.getGutter = function(projection) { @@ -172,7 +172,7 @@ TileSource.prototype.setKey = function(key) { /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {boolean} Opaque. */ TileSource.prototype.getOpaque = function(projection) { @@ -194,7 +194,7 @@ TileSource.prototype.getResolutions = function() { * @param {number} x Tile coordinate x. * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {!ol.Tile} Tile. */ TileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {}; @@ -211,7 +211,7 @@ TileSource.prototype.getTileGrid = function() { /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {!ol.tilegrid.TileGrid} Tile grid. */ TileSource.prototype.getTileGridForProjection = function(projection) { @@ -224,7 +224,7 @@ TileSource.prototype.getTileGridForProjection = function(projection) { /** - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {ol.TileCache} Tile cache. * @protected */ @@ -253,7 +253,7 @@ TileSource.prototype.getTilePixelRatio = function(pixelRatio) { /** * @param {number} z Z. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {module:ol/size~Size} Tile size. */ TileSource.prototype.getTilePixelSize = function(z, pixelRatio, projection) { @@ -273,7 +273,7 @@ TileSource.prototype.getTilePixelSize = function(z, pixelRatio, projection) { * is outside the resolution and extent range of the tile grid, `null` will be * returned. * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. - * @param {ol.proj.Projection=} opt_projection Projection. + * @param {module:ol/proj/Projection~Projection=} opt_projection Projection. * @return {module:ol/tilecoord~TileCoord} Tile coordinate to be passed to the tileUrlFunction or * null if no tile URL should be created for the passed `tileCoord`. */ @@ -302,7 +302,7 @@ TileSource.prototype.refresh = function() { * @param {number} z Tile coordinate z. * @param {number} x Tile coordinate x. * @param {number} y Tile coordinate y. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. */ TileSource.prototype.useTile = UNDEFINED; diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index 29c5124d7b..7f0eb68c3f 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -90,7 +90,7 @@ TileArcGISRest.prototype.getParams = function() { * @param {module:ol/size~Size} tileSize Tile size. * @param {module:ol/extent~Extent} tileExtent Tile extent. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {Object} params Params. * @return {string|undefined} Request URL. * @private diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 5329ff7c92..ca49e7dee3 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -204,7 +204,7 @@ TileImage.prototype.getTileCacheForProjection = function(projection) { * @param {number} x Tile coordinate x. * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {string} key The key set on the tile. * @return {!ol.Tile} Tile. * @private @@ -233,7 +233,7 @@ TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) * @inheritDoc */ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { - const sourceProjection = /** @type {!ol.proj.Projection} */ (this.getProjection()); + const sourceProjection = /** @type {!module:ol/proj/Projection~Projection} */ (this.getProjection()); if (!ENABLE_RASTER_REPROJECTION || !sourceProjection || !projection || equivalent(sourceProjection, projection)) { return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection); @@ -282,7 +282,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { * @param {number} x Tile coordinate x. * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. - * @param {!ol.proj.Projection} projection Projection. + * @param {!module:ol/proj/Projection~Projection} projection Projection. * @return {!ol.Tile} Tile. * @protected */ diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 342d52af3d..c207d78605 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -185,7 +185,7 @@ TileWMS.prototype.getParams = function() { * @param {module:ol/size~Size} tileSize Tile size. * @param {module:ol/extent~Extent} tileExtent Tile extent. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {Object} params Params. * @return {string|undefined} Request URL. * @private diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 1ce27269d3..ad9ee8ce37 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -752,7 +752,7 @@ VectorSource.prototype.isEmpty = function() { /** * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. */ VectorSource.prototype.loadFeatures = function(extent, resolution, projection) { const loadedExtentsRtree = this.loadedExtentsRtree_; diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 937038cd00..162b860e02 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -123,7 +123,7 @@ const WMTS = function(options) { /** * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {string|undefined} Tile URL. */ function(tileCoord, pixelRatio, projection) { diff --git a/src/ol/source/Zoomify.js b/src/ol/source/Zoomify.js index 0b50cf352c..a3663deade 100644 --- a/src/ol/source/Zoomify.js +++ b/src/ol/source/Zoomify.js @@ -169,7 +169,7 @@ const Zoomify = function(opt_options) { /** * @param {module:ol/tilecoord~TileCoord} tileCoord Tile Coordinate. * @param {number} pixelRatio Pixel ratio. - * @param {ol.proj.Projection} projection Projection. + * @param {module:ol/proj/Projection~Projection} projection Projection. * @return {string|undefined} Tile URL. */ function(tileCoord, pixelRatio, projection) { diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index ccf4eed2fb..725e35c9df 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -80,12 +80,12 @@ ol.CanvasFillState; * used by the source as an image. The arguments passed to the function are: * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution, * `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and - * {@link ol.proj.Projection} the image projection. The canvas returned by + * {@link module:ol/proj/Projection~Projection} the image projection. The canvas returned by * this function is cached by the source. The this keyword inside the function * references the {@link ol.source.ImageCanvas}. * * @typedef {function(this:ol.source.ImageCanvas, module:ol/extent~Extent, number, - * number, module:ol/size~Size, ol.proj.Projection): HTMLCanvasElement} + * number, module:ol/size~Size, module:ol/proj/Projection~Projection): HTMLCanvasElement} */ ol.CanvasFunctionType;