diff --git a/src/ol/View.js b/src/ol/View.js index 2af5ac324a..8ae88fbd55 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -148,7 +148,7 @@ import Units from './proj/Units.js'; * during a rotation or resolution animation. * @property {number} [duration=1000] The duration of the animation in milliseconds. * @property {function(number):number} [easing] The easing function used - * during the animation (defaults to {@link ol.easing.inAndOut}). + * during the animation (defaults to {@link module:ol/easing~inAndOut}). * The function will be called for each frame with a number representing a * fraction of the animation's duration. The function should return a number * between 0 and 1 representing the progress toward the destination state. diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index 1eb15060e4..20f52f46ea 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -21,7 +21,7 @@ import {appendParams} from '../uri.js'; * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from * the remote server. - * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given + * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given * a URL. * @property {Object.} params ArcGIS Rest parameters. This field is optional. Service * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index 804703dcee..15dc931200 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -15,7 +15,7 @@ import {appendParams} from '../uri.js'; * @property {string} [url] The mapagent url. * @property {number} [displayDpi=96] The display resolution. * @property {number} [metersPerUnit=1] The meters-per-unit value. - * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting + * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting * the image from the remote server. * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`. * @property {module:ol/proj~ProjectionLike} projection Projection. @@ -23,7 +23,7 @@ import {appendParams} from '../uri.js'; * twice the width and height of the map viewport, and so on. Must be `1` or higher. * @property {Array.} [resolutions] Resolutions. * If specified, requests will be made for these resolutions only. - * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL. + * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL. * @property {Object} [params] Additional parameters. */ @@ -232,7 +232,7 @@ ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, project 'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE', 'VERSION': '2.0.0', 'LOCALE': 'en', - 'CLIENTAGENT': 'ol.source.ImageMapGuide source', + 'CLIENTAGENT': 'ol/source/ImageMapGuide source', 'CLIP': '1', 'SETDISPLAYDPI': this.displayDpi_, 'SETDISPLAYWIDTH': Math.round(size[0]), diff --git a/src/ol/source/ImageStatic.js b/src/ol/source/ImageStatic.js index cc8cdd553a..9286efef26 100644 --- a/src/ol/source/ImageStatic.js +++ b/src/ol/source/ImageStatic.js @@ -20,7 +20,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js'; * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. * @property {module:ol/extent~Extent} [imageExtent] Extent of the image in map coordinates. * This is the [left, bottom, right, top] map coordinates of your image. - * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL. + * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL. * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {module:ol/size~Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this * only needs to be set if auto-detection fails for some reason. diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index 78631efba7..05bda634a7 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -24,11 +24,11 @@ import {appendParams} from '../uri.js'; * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to * access pixel data with the Canvas renderer. See * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. - * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting + * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting * the image from the remote server. * @property {module:ol/source/WMSServerType|string} [serverType] The type of * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`. - * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL. + * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL. * @property {Object.} params WMS request parameters. * At least a `LAYERS` param is required. `STYLES` is * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX` diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 067cd0ed7c..18252094bf 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -72,7 +72,7 @@ const RasterOperationType = { /** * @classdesc - * Events emitted by {@link ol.source.Raster} instances are instances of this + * Events emitted by {@link module:ol/source/Raster} instances are instances of this * type. * * @constructor @@ -152,7 +152,7 @@ const RasterSource = function(options) { /** * @private - * @type {ol.source.RasterOperationType} + * @type {module:ol/source/RasterOperationType} */ this.operationType_ = options.operationType !== undefined ? options.operationType : RasterOperationType.PIXEL; @@ -328,7 +328,7 @@ RasterSource.prototype.getImage = function(extent, resolution, pixelRatio, proje const frameState = this.updateFrameState_(extent, resolution, projection); this.requestedFrameState_ = frameState; - // check if we can't reuse the existing ol.ImageCanvas + // check if we can't reuse the existing ol/ImageCanvas if (this.renderedImageCanvas_) { const renderedResolution = this.renderedImageCanvas_.getResolution(); const renderedExtent = this.renderedImageCanvas_.getExtent(); diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index 1f109faeb7..8e1c78a042 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -26,12 +26,12 @@ import {appendParams} from '../uri.js'; * override the default service layer visibility. See * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/} * for further reference. - * @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid. Base this on the resolutions, + * @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. Base this on the resolutions, * tilesize and extent supported by the server. * If this is not defined, a default grid will be used: if there is a projection * extent, the grid will be based on that; if not, a grid based on a global * extent with origin at 0,0 will be used. - * @property {ol.ProjectionLike} projection Projection. + * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). * Higher values can increase reprojection performance, but decrease precision. * @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js index 701d9ce9cf..0fc40f2c9d 100644 --- a/src/ol/source/TileDebug.js +++ b/src/ol/source/TileDebug.js @@ -116,7 +116,7 @@ inherits(TileDebug, TileSource); TileDebug.prototype.getTile = function(z, x, y) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return /** @type {!ol.source.LabeledTile} */ (this.tileCache.get(tileCoordKey)); + return /** @type {!module:ol/source/LabeledTile} */ (this.tileCache.get(tileCoordKey)); } else { const tileSize = toSize(this.tileGrid.getTileSize(z)); const tileCoord = [z, x, y]; diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 7f86a95792..fe817ab87d 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -40,7 +40,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js'; * service advertizes 256px by 256px tiles but actually sends 512px * by 512px images (for retina/hidpi devices) then `tilePixelRatio` * should be set to `2`. - * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection. + * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection. * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be * used instead of defining each one separately in the `urls` option. diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js index 3e750435ae..566204c2c4 100644 --- a/src/ol/source/TileUTFGrid.js +++ b/src/ol/source/TileUTFGrid.js @@ -384,7 +384,7 @@ UTFGrid.prototype.forDataAtCoordinateAndResolution = function( if (this.tileGrid) { const tileCoord = this.tileGrid.getTileCoordForCoordAndResolution( coordinate, resolution); - const tile = /** @type {!ol.source.CustomTile} */(this.getTile( + const tile = /** @type {!module:ol/source/CustomTile} */(this.getTile( tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection())); tile.forDataAtCoordinate(coordinate, callback, null, opt_request); } else { @@ -408,7 +408,7 @@ UTFGrid.prototype.handleTileJSONError = function() { /** - * TODO: very similar to ol.source.TileJSON#handleTileJSONResponse + * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse * @protected * @param {TileJSON} tileJSON Tile JSON. */ diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index b6f2495480..2637773df4 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -38,7 +38,7 @@ import {appendParams} from '../uri.js'; * "artifacts at tile edges" issues by properly configuring the WMS service. For * example, MapServer has a `tile_map_edge_buffer` configuration parameter for * this. See http://mapserver.org/output/tile_mode.html. - * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting + * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting * the image from the remote server. * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels). diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index bf626fe0a2..3e6718783f 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -24,7 +24,7 @@ import RBush from '../structs/RBush.js'; /** * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this - * is one of the standard {@link ol.loadingstrategy} strategies. + * is one of the standard {@link module:ol/loadingstrategy} strategies. * * @typedef {function(module:ol/extent~Extent, number): Array.} LoadingStrategy * @api @@ -73,8 +73,12 @@ inherits(VectorSourceEvent, Event); * Example: * * ```js - * var vectorSource = new VectorSource({ - * format: new ol.format.GeoJSON(), + * import {Vector} from 'ol/source'; + * import {GeoJSON} from 'ol/format'; + * import {bbox} from 'ol/loadingstrategy'; + * + * var vectorSource = new Vector({ + * format: new GeoJSON(), * loader: function(extent, resolution, projection) { * var proj = projection.getCode(); * var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' + @@ -97,7 +101,7 @@ inherits(VectorSourceEvent, Event); * } * xhr.send(); * }, - * strategy: ol.loadingstrategy.bbox + * strategy: bbox * }); * ``` * @property {boolean} [overlaps=true] This source may have overlapping geometries. @@ -105,12 +109,12 @@ inherits(VectorSourceEvent, Event); * boundaries or TopoJSON sources) allows the renderer to optimise fill and * stroke operations. * @property {module:ol/source/Vector~LoadingStrategy} [strategy] The loading strategy to use. - * By default an {@link ol.loadingstrategy.all} + * By default an {@link module:ol/loadingstrategy~all} * strategy is used, a one-off strategy which loads all features at once. * @property {string|module:ol/featureloader~FeatureUrlfunction} [url] * Setting this option instructs the source to load features using an XHR loader - * (see {@link ol.featureloader.xhr}). Use a `string` and an - * {@link ol.loadingstrategy.all} for a one-off download of all features from + * (see {@link module:ol/featureloader~xhr}). Use a `string` and an + * {@link module:ol/loadingstrategy~all} for a one-off download of all features from * the given URL. Use a {@link module:ol/featureloader~FeatureUrlfunction} to generate the url with * other loading strategies. * Requires `format` to be set as well. @@ -233,7 +237,7 @@ const VectorSource = function(opt_options) { this.idIndex_ = {}; /** - * A lookup of features without id (keyed by ol.getUid(feature)). + * A lookup of features without id (keyed by getUid(feature)). * @private * @type {!Object.} */ diff --git a/src/ol/source/VectorEventType.js b/src/ol/source/VectorEventType.js index f9cd8d21b1..85cc1256b8 100644 --- a/src/ol/source/VectorEventType.js +++ b/src/ol/source/VectorEventType.js @@ -29,7 +29,7 @@ export default { /** * Triggered when a feature is removed from the source. - * See {@link ol.source.Vector#clear source.clear()} for exceptions. + * See {@link module:ol/source/Vector#clear source.clear()} for exceptions. * @event ol/source/Vector~VectorSourceEvent#removefeature * @api */ diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index b953d8b40f..b6fd6e6b23 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -22,7 +22,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid. * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {module:ol/source/State~State} [state] Source state. * @property {module:ol/VectorTile~TileClass} [tileClass] Class used to instantiate image tiles. - * Default is {@link ol.VectorTile}. + * Default is {@link module:ol/VectorTile}. * @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. * @property {module:ol/Tile~LoadFunction} [tileLoadFunction] * Optional function to load a tile given a URL. Could look like this: @@ -38,7 +38,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid. * })); * }; * }); - * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection. + * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection. * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be * used instead of defining each one separately in the `urls` option. diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 730f03f130..6638ea53ff 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -31,7 +31,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * by 512px images (for retina/hidpi devices) then `tilePixelRatio` * should be set to `2`. * @property {number|module:ol/size~Size} [tileSize=[256, 256]] The tile size used by the tile service. - * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get + * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get * tile URL given a tile coordinate and the projection. * Required if url or urls are not provided. * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,