diff --git a/src/ol/control/MousePosition.js b/src/ol/control/MousePosition.js index 20c9c48b84..b36abdc8ee 100644 --- a/src/ol/control/MousePosition.js +++ b/src/ol/control/MousePosition.js @@ -25,7 +25,7 @@ const COORDINATE_FORMAT = 'coordinateFormat'; * @typedef {Object} Options * @property {string} [className='ol-mouse-position'] CSS class name. * @property {module:ol/coordinate~CoordinateFormat} [coordinateFormat] Coordinate format. - * @property {ol.ProjectionLike} projection Projection. + * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the * control should be re-rendered. This is called in a `requestAnimationFrame` * callback. diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index 0a7a2fed6a..f04ac2b87c 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -8,14 +8,14 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten /** * @typedef {Object} ReadOptions - * @property {ol.ProjectionLike} dataProjection Projection of the data we are reading. + * @property {module:ol/proj~ProjectionLike} dataProjection Projection of the data we are reading. * If not provided, the projection will be derived from the data (where possible) or * the `defaultDataProjection` of the format is assigned (where set). If the projection * can not be derived from the data and if no `defaultDataProjection` is set for a format, * the features will not be reprojected. * @property {module:ol/extent~Extent} extent Tile extent of the tile being read. This is only used and * required for {@link ol.format.MVT}. - * @property {ol.ProjectionLike} featureProjection Projection of the feature geometries + * @property {module:ol/proj~ProjectionLike} featureProjection Projection of the feature geometries * created by the format reader. If not provided, features will be returned in the * `dataProjection`. */ @@ -23,11 +23,11 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten /** * @typedef {Object} WriteOptions - * @property {ol.ProjectionLike} dataProjection Projection of the data we are writing. + * @property {module:ol/proj~ProjectionLike} dataProjection Projection of the data we are writing. * If not provided, the `defaultDataProjection` of the format is assigned (where set). * If no `defaultDataProjection` is set for a format, the features will be returned * in the `featureProjection`. - * @property {ol.ProjectionLike} featureProjection Projection of the feature geometries + * @property {module:ol/proj~ProjectionLike} featureProjection Projection of the feature geometries * that will be serialized by the format writer. If not provided, geometries are assumed * to be in the `dataProjection` if that is set; in other words, they are not transformed. * @property {boolean} [rightHanded] When writing geometries, follow the right-hand diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index d855f84d52..00d3fec7f8 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -22,16 +22,14 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {ol.ProjectionLike} defaultDataProjection Default data projection. - * Default is `EPSG:4326`. - * @property {ol.ProjectionLike} featureProjection Projection for features read or + * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or * written by the format. Options passed to read or write methods will take precedence. - * @property {string|undefined} geometryName Geometry name to use when creating features. - * @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include + * @property {string} [geometryName] Geometry name to use when creating features. + * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader * will look for that field to set the geometry name. If both this field is set to `true` * and a `geometryName` is provided, the `geometryName` will take precedence. - * Default is `false`. */ diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 1c0ec01e18..14f8e8fd98 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -230,13 +230,11 @@ function createStyleDefaults() { /** * @typedef {Object} Options - * @property {boolean|undefined} extractStyles Extract styles from the KML. - * Default is `true`. - * @property {boolean|undefined} showPointNames Show names as labels for placemarks - * which contain points. Default is `true`. - * @property {Array.|undefined} defaultStyle Default style. The + * @property {boolean} [extractStyles=true] Extract styles from the KML. + * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points. + * @property {Array.} [defaultStyle] Default style. The * default default style is the same as Google Earth. - * @property {boolean|undefined} writeStyles Write styles into KML. Default is `true`. + * @property {boolean} [writeStyles=true] Write styles into KML. */ diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index c683a59018..7683bad751 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -16,10 +16,9 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {number|undefined} factor The factor by which the coordinates - * values will be scaled. Default is `1e5`. - * @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the - * feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`. + * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled. + * @property {module:ol/geom/GeometryLayout~GeometryLayout} [geometryLayout='XY'] Layout of the + * feature geometries created by the format reader. */ diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 3d0245ea1e..2ae25edeb4 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -16,9 +16,8 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {ol.ProjectionLike} defaultDataProjection Default data projection. - * Default is `EPSG:4326`. - * @property {string|undefined} layerName Set the name of the TopoJSON topology + * @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection. + * @property {string} [layerName] Set the name of the TopoJSON topology * `objects`'s children as feature property with the specified name. This means * that when set to `'layer'`, a topology like * ``` @@ -34,7 +33,7 @@ import {get as getProjection} from '../proj.js'; * ``` * will result in features that have a property `'layer'` set to `'example'`. * When not set, no property will be added to features. - * @property {Array.|undefined} layers Names of the TopoJSON topology's + * @property {Array.} [layers] Names of the TopoJSON topology's * `objects`'s children to read features from. If not provided, features will * be read from all children. */ diff --git a/src/ol/interaction/DoubleClickZoom.js b/src/ol/interaction/DoubleClickZoom.js index 9058896ebf..f593070778 100644 --- a/src/ol/interaction/DoubleClickZoom.js +++ b/src/ol/interaction/DoubleClickZoom.js @@ -8,8 +8,8 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js'; /** * @typedef {Object} Options - * @property {number} [duration] Animation duration in milliseconds. Default is `250`. - * @property {number} [delta] The zoom delta applied on each double click, default is `1`. + * @property {number} [duration=250] Animation duration in milliseconds. + * @property {number} [delta=1] The zoom delta applied on each double click. */ diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 542dba32ba..8929b954db 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -14,14 +14,14 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {Array.|undefined} formatConstructors Format constructors. - * @property {ol.source.Vector|undefined} source Optional vector source where features will be added. If a source is provided + * @property {Array.} [formatConstructors] Format constructors. + * @property {ol.source.Vector} [source] Optional vector source where features will be added. If a source is provided * all existing features will be removed and new features will be added when * they are dropped on the target. If you want to add features to a vector * source without removing the existing features (append only), instead of * providing the source option listen for the "addfeatures" event. - * @property {ol.ProjectionLike} projection Target projection. By default, the map's view's projection is used. - * @property {Element|undefined} target The element that is used as the drop target, default is the viewport element. + * @property {module:ol/proj~ProjectionLike} [projection] Target projection. By default, the map's view's projection is used. + * @property {Element} [target] The element that is used as the drop target, default is the viewport element. */ @@ -44,7 +44,7 @@ const DragAndDropEventType = { * of this type. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.interaction.DragAndDropEvent} * @param {module:ol/interaction/DragAndDrop~DragAndDropEventType} type Type. * @param {File} file File. diff --git a/src/ol/interaction/DragBox.js b/src/ol/interaction/DragBox.js index e1588ceb37..79219b8218 100644 --- a/src/ol/interaction/DragBox.js +++ b/src/ol/interaction/DragBox.js @@ -20,13 +20,13 @@ import RenderBox from '../render/Box.js'; /** * @typedef {Object} Options - * @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`. - * @property {module:ol/events/condition~Condition|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean + * @property {string} [className='ol-dragbox'] CSS class name for styling the box. + * @property {module:ol/events/condition~Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean * to indicate whether that event should be handled. * Default is {@link ol/events/condition~always}. - * @property {number|undefined} minArea The minimum area of the box in pixel, this value is used by the default - * `boxEndCondition` function. Default is `64`. - * @property {module:ol/interaction/DragBox~EndCondition|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two + * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default + * `boxEndCondition` function. + * @property {module:ol/interaction/DragBox~EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two * {@link module:ol~Pixel}s to indicate whether a `boxend` event should be fired. * Default is `true` if the area of the box is bigger than the `minArea` option. */ diff --git a/src/ol/interaction/PinchRotate.js b/src/ol/interaction/PinchRotate.js index b016c664d1..b63f8ea744 100644 --- a/src/ol/interaction/PinchRotate.js +++ b/src/ol/interaction/PinchRotate.js @@ -14,7 +14,7 @@ import {disable} from '../rotationconstraint.js'; * @property {number} [duration=250] The duration of the animation in * milliseconds. * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation. - */ + */ /** diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index 81249781bb..d7a5bd9aa7 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -57,7 +57,7 @@ const handleMoveEvent = UNDEFINED; * also during a drag sequence (so during a drag sequence both the * `handleDragEvent` function and this function are called). * @property {(function(module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent):boolean)} [handleUpEvent] - Function handling "up" events. If the function returns `false` then the + * Function handling "up" events. If the function returns `false` then the * current drag sequence is stopped. */ diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index 6d3c1de186..79dfa4d48c 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -35,12 +35,12 @@ import RBush from '../structs/RBush.js'; /** * @typedef {Object} Options - * @property {module:ol/Collection~Collection.|undefined} features Snap to these features. Either this option or source should be provided. - * @property {boolean|undefined} edge Snap to edges. Default is `true`. - * @property {boolean|undefined} vertex Snap to vertices. Default is `true`. - * @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or - * vertex for snapping. Default is `10` pixels. - * @property {module:ol/source/Vector~Vector|undefined} source Snap to features from this source. Either this option or features should be provided + * @property {module:ol/Collection~Collection.} [features] Snap to these features. Either this option or source should be provided. + * @property {boolean} [edge=true] Snap to edges. + * @property {boolean} [vertex=true] Snap to vertices. + * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or + * vertex for snapping. + * @property {module:ol/source/Vector~Vector} [source] Snap to features from this source. Either this option or features should be provided */ diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 8064f47802..9035c35a52 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -39,16 +39,16 @@ const TranslateEventType = { /** * @typedef {Object} interaction_TranslateOptions - * @property {module:ol/Collection~Collection.|undefined} features Only features contained in this collection will be able to be translated. If + * @property {module:ol/Collection~Collection.} [features] Only features contained in this collection will be able to be translated. If * not specified, all features on the map will be able to be translated. - * @property {undefined|Array.|function(module:ol/layer/Layer~Layer): boolean} layers A list of layers from which features should be + * @property {Array.|function(module:ol/layer/Layer~Layer): boolean} [layers] A list of layers from which features should be * translated. Alternatively, a filter function can be provided. The * function will be called for each layer in the map and should return * `true` for layers that you want to be translatable. If the option is * absent, all visible layers will be considered translatable. - * @property {number|undefined} hitTolerance Hit-detection tolerance. Pixels inside the radius around the given position + * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position * will be checked for features. This only works for the canvas renderer and - * not for WebGL. Default is `0`. + * not for WebGL. */ diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index c2593eaf90..788a4e6e59 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -53,7 +53,7 @@ const BaseLayer = function(options) { /** * The layer type. - * @type {ol.LayerType} + * @type {module:ol/LayerType~LayerType} * @protected; */ this.type; @@ -65,7 +65,7 @@ inherits(BaseLayer, BaseObject); /** * Get the layer type (used when creating a layer renderer). - * @return {ol.LayerType} The layer type. + * @return {module:ol/LayerType~LayerType} The layer type. */ BaseLayer.prototype.getType = function() { return this.type; diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index 375c027e13..ee52d7acad 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -89,7 +89,7 @@ LayerGroup.prototype.handleLayerChange_ = function() { /** - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. * @private */ LayerGroup.prototype.handleLayersChanged_ = function(event) { diff --git a/src/ol/layer/Image.js b/src/ol/layer/Image.js index ae762793ff..41d5a1ecea 100644 --- a/src/ol/layer/Image.js +++ b/src/ol/layer/Image.js @@ -26,7 +26,7 @@ const ImageLayer = function(opt_options) { /** * The layer type. * @protected - * @type {ol.LayerType} + * @type {module:ol/LayerType~LayerType} */ this.type = LayerType.IMAGE; diff --git a/src/ol/layer/Tile.js b/src/ol/layer/Tile.js index 0ca438faf2..5a9ebc330d 100644 --- a/src/ol/layer/Tile.js +++ b/src/ol/layer/Tile.js @@ -37,7 +37,7 @@ const TileLayer = function(opt_options) { /** * The layer type. * @protected - * @type {ol.LayerType} + * @type {module:ol/LayerType~LayerType} */ this.type = LayerType.TILE; diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index 842303e128..1378a3ce35 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -95,7 +95,7 @@ const VectorLayer = function(opt_options) { /** * The layer type. * @protected - * @type {ol.LayerType} + * @type {module:ol/LayerType~LayerType} */ this.type = LayerType.VECTOR; diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index 91cec5a911..8fa162629e 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -48,7 +48,7 @@ const VectorTileLayer = function(opt_options) { /** * The layer type. * @protected - * @type {ol.LayerType} + * @type {module:ol/LayerType~LayerType} */ this.type = LayerType.VECTOR_TILE; diff --git a/src/ol/pointer/PointerEvent.js b/src/ol/pointer/PointerEvent.js index f0d2d3017f..413821b9bd 100644 --- a/src/ol/pointer/PointerEvent.js +++ b/src/ol/pointer/PointerEvent.js @@ -41,7 +41,7 @@ import Event from '../events/Event.js'; * touch events and even native pointer events. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @param {string} type The type of the event to create. * @param {Event} originalEvent The event. * @param {Object.=} opt_eventDict An optional dictionary of diff --git a/src/ol/render/Event.js b/src/ol/render/Event.js index 775eb0b35c..d02c89fbfd 100644 --- a/src/ol/render/Event.js +++ b/src/ol/render/Event.js @@ -6,7 +6,7 @@ import Event from '../events/Event.js'; /** * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.render.Event} * @param {ol.render.EventType} type Type. * @param {ol.render.VectorContext=} opt_vectorContext Vector context. diff --git a/src/ol/renderer/Layer.js b/src/ol/renderer/Layer.js index 298bfde04d..048261bb79 100644 --- a/src/ol/renderer/Layer.js +++ b/src/ol/renderer/Layer.js @@ -57,11 +57,9 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE; * Create a function that adds loaded tiles to the tile lookup. * @param {ol.source.Tile} source Tile source. * @param {module:ol/proj/Projection~Projection} projection Projection of the tiles. - * @param {Object.>} tiles Lookup of loaded - * tiles by zoom level. + * @param {Object.>} tiles Lookup of loaded tiles by zoom level. * @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be - * called with a zoom level and a tile range to add loaded tiles to the - * lookup. + * called with a zoom level and a tile range to add loaded tiles to the lookup. * @protected */ LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, tiles) { @@ -93,7 +91,7 @@ LayerRenderer.prototype.getLayer = function() { /** * Handle changes in image state. - * @param {ol.events.Event} event Image change event. + * @param {module:ol/events/Event~Event} event Image change event. * @private */ LayerRenderer.prototype.handleImageChange_ = function(event) { @@ -107,9 +105,8 @@ LayerRenderer.prototype.handleImageChange_ = function(event) { /** * Load the image if not already loaded, and register the image change * listener if needed. - * @param {ol.ImageBase} image Image. - * @return {boolean} `true` if the image is already loaded, `false` - * otherwise. + * @param {module:ol/ImageBase~ImageBase} image Image. + * @return {boolean} `true` if the image is already loaded, `false` otherwise. * @protected */ LayerRenderer.prototype.loadImage = function(image) { @@ -202,7 +199,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til * @param {module:ol/extent~Extent} extent Extent. * @param {number} currentZ Current Z. * @param {number} preload Load low resolution tiles up to 'preload' levels. - * @param {function(this: T, ol.Tile)=} opt_tileCallback Tile callback. + * @param {function(this: T, module:ol/Tile~Tile)=} opt_tileCallback Tile callback. * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`. * @protected * @template T diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index 777594ba22..815b71acd9 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -27,7 +27,7 @@ const CanvasImageLayerRenderer = function(imageLayer) { /** * @private - * @type {?ol.ImageBase} + * @type {?module:ol/ImageBase~ImageBase} */ this.image_ = null; diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index f0ecb44b33..d60ee1892f 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -48,7 +48,7 @@ const CanvasTileLayerRenderer = function(tileLayer) { /** * @protected - * @type {!Array.} + * @type {!Array.} */ this.renderedTiles = []; @@ -105,7 +105,7 @@ CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) { /** * @private - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile~Tile} tile Tile. * @return {boolean} Tile is drawable. */ CanvasTileLayerRenderer.prototype.isDrawableTile_ = function(tile) { @@ -151,7 +151,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio); /** - * @type {Object.>} + * @type {Object.>} */ const tilesToDrawByZ = {}; tilesToDrawByZ[z] = {}; @@ -298,7 +298,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState /** - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile~Tile} tile Tile. * @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/layer/Layer~State} layerState Layer state. * @param {number} x Left of the tile. diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index dc0a1030ff..86f0d6c075 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -273,7 +273,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi /** - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. */ CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function(event) { const layer = this.getLayer(); @@ -285,7 +285,7 @@ CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function(event) { /** * Handle changes in image style state. - * @param {ol.events.Event} event Image style change event. + * @param {module:ol/events/Event~Event} event Image style change event. * @private */ CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) { diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 4336b02b02..817248c013 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -339,7 +339,7 @@ CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function(tile, fra /** - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. */ CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) { const layer = this.getLayer(); @@ -351,7 +351,7 @@ CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) { /** * Handle changes in image style state. - * @param {ol.events.Event} event Image style change event. + * @param {module:ol/events/Event~Event} event Image style change event. * @private */ CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event) { diff --git a/src/ol/renderer/vector.js b/src/ol/renderer/vector.js index bb74ff557e..d2478848b0 100644 --- a/src/ol/renderer/vector.js +++ b/src/ol/renderer/vector.js @@ -91,7 +91,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) { * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {ol.style.Style} style Style. * @param {number} squaredTolerance Squared tolerance. - * @param {function(this: T, ol.events.Event)} listener Listener function. + * @param {function(this: T, module:ol/events/Event~Event)} listener Listener function. * @param {T} thisArg Value to use as `this` when executing `listener`. * @return {boolean} `true` if style is loading. * @template T diff --git a/src/ol/renderer/webgl/ImageLayer.js b/src/ol/renderer/webgl/ImageLayer.js index 9788bbb9c5..c7c5c76ed4 100644 --- a/src/ol/renderer/webgl/ImageLayer.js +++ b/src/ol/renderer/webgl/ImageLayer.js @@ -38,7 +38,7 @@ const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) { /** * The last rendered image. * @private - * @type {?ol.ImageBase} + * @type {?module:ol/ImageBase~ImageBase} */ this.image_ = null; @@ -85,7 +85,7 @@ WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) { /** - * @param {ol.ImageBase} image Image. + * @param {module:ol/ImageBase~ImageBase} image Image. * @private * @return {WebGLTexture} Texture. */ diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index e235de993a..b2d9c8a2d0 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -136,7 +136,7 @@ const WebGLMapRenderer = function(container, map) { * @return {string} Key. */ function(element) { - return /** @type {ol.Tile} */ (element[0]).getKey(); + return /** @type {module:ol/Tile~Tile} */ (element[0]).getKey(); }); @@ -151,7 +151,7 @@ const WebGLMapRenderer = function(container, map) { if (!this.tileTextureQueue_.isEmpty()) { this.tileTextureQueue_.reprioritize(); const element = this.tileTextureQueue_.dequeue(); - const tile = /** @type {ol.Tile} */ (element[0]); + const tile = /** @type {module:ol/Tile~Tile} */ (element[0]); const tileSize = /** @type {module:ol/size~Size} */ (element[3]); const tileGutter = /** @type {number} */ (element[4]); this.bindTileTexture( @@ -195,7 +195,7 @@ WebGLMapRenderer['create'] = function(container, map) { /** - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile~Tile} tile Tile. * @param {module:ol/size~Size} tileSize Tile size. * @param {number} tileGutter Tile gutter. * @param {number} magFilter Mag filter. @@ -367,7 +367,7 @@ WebGLMapRenderer.prototype.getType = function() { /** - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. * @protected */ WebGLMapRenderer.prototype.handleWebGLContextLost = function(event) { @@ -409,7 +409,7 @@ WebGLMapRenderer.prototype.initializeGL_ = function() { /** - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile~Tile} tile Tile. * @return {boolean} Is tile texture loaded. */ WebGLMapRenderer.prototype.isTileTextureLoaded = function(tile) { diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js index 934f83c052..a12698e985 100644 --- a/src/ol/renderer/webgl/TileLayer.js +++ b/src/ol/renderer/webgl/TileLayer.js @@ -242,7 +242,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState, gl.uniform1i(this.locations_.u_texture, 0); /** - * @type {Object.>} + * @type {Object.>} */ const tilesToDrawByZ = {}; tilesToDrawByZ[z] = {}; @@ -344,7 +344,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState, frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload(), /** - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile~Tile} tile Tile. */ function(tile) { if (tile.getState() == TileState.LOADED && diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js index ed290037d8..6dadad36de 100644 --- a/src/ol/renderer/webgl/VectorLayer.js +++ b/src/ol/renderer/webgl/VectorLayer.js @@ -200,7 +200,7 @@ WebGLVectorLayerRenderer.prototype.forEachLayerAtPixel = function(pixel, frameSt /** * Handle changes in image style state. - * @param {ol.events.Event} event Image style change event. + * @param {module:ol/events/Event~Event} event Image style change event. * @private */ WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) { diff --git a/src/ol/reproj/Image.js b/src/ol/reproj/Image.js index cc8b62819c..3a2731c260 100644 --- a/src/ol/reproj/Image.js +++ b/src/ol/reproj/Image.js @@ -17,7 +17,7 @@ import Triangulation from '../reproj/Triangulation.js'; * See {@link ol.source.Image}. * * @constructor - * @extends {ol.ImageBase} + * @extends {module:ol/ImageBase~ImageBase} * @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. @@ -75,7 +75,7 @@ const ReprojImage = function(sourceProj, targetProj, /** * @private - * @type {ol.ImageBase} + * @type {module:ol/ImageBase~ImageBase} */ this.sourceImage_ = getImageFunction(sourceExtent, sourceResolution, pixelRatio); diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index a5737a05f6..d66fd38c59 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -18,7 +18,7 @@ import Triangulation from '../reproj/Triangulation.js'; * See {@link ol.source.TileImage}. * * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/proj/Projection~Projection} sourceProj Source projection. * @param {module:ol/tilegrid/TileGrid~TileGrid} sourceTileGrid Source tile grid. * @param {module:ol/proj/Projection~Projection} targetProj Target projection. @@ -82,7 +82,7 @@ const ReprojTile = function(sourceProj, sourceTileGrid, /** * @private - * @type {!Array.} + * @type {!Array.} */ this.sourceTiles_ = []; diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index 4dd3e3da6c..a7982bd5a7 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -47,7 +47,7 @@ const ImageSourceEventType = { * type. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.source.ImageEvent} * @param {string} type Type. * @param {ol.Image} image The image. @@ -140,7 +140,7 @@ ImageSource.prototype.findNearestResolution = function(resolution) { * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. - * @return {ol.ImageBase} Single image. + * @return {module:ol/ImageBase~ImageBase} Single image. */ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projection) { const sourceProjection = this.getProjection(); @@ -184,7 +184,7 @@ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projec * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. - * @return {ol.ImageBase} Single image. + * @return {module:ol/ImageBase~ImageBase} Single image. * @protected */ ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {}; @@ -192,7 +192,7 @@ ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio /** * Handle image change events. - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. * @protected */ ImageSource.prototype.handleImageChange = function(event) { diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 9dd41200f1..7425236340 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -48,7 +48,7 @@ const RasterEventType = { * type. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.source.RasterEvent} * @param {string} type Type. * @param {module:ol/PluggableMap~FrameState} frameState The frame state. @@ -129,7 +129,7 @@ const RasterSource = function(options) { /** * @private - * @type {ol.TileQueue} + * @type {module:ol/TileQueue~TileQueue} */ this.tileQueue_ = new TileQueue( function() { diff --git a/src/ol/source/Tile.js b/src/ol/source/Tile.js index 49ed977967..b075939e99 100644 --- a/src/ol/source/Tile.js +++ b/src/ol/source/Tile.js @@ -55,7 +55,7 @@ const TileSource = function(options) { /** * @protected - * @type {ol.TileCache} + * @type {module:ol/TileCache~TileCache} */ this.tileCache = new TileCache(options.cacheSize); @@ -106,7 +106,7 @@ TileSource.prototype.expireCache = function(projection, usedTiles) { * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {number} z Zoom level. * @param {module:ol/TileRange~TileRange} tileRange Tile range. - * @param {function(ol.Tile):(boolean|undefined)} callback Called with each + * @param {function(module:ol/Tile~Tile):(boolean|undefined)} callback Called with each * loaded tile. If the callback returns `false`, the tile will not be * considered loaded. * @return {boolean} The tile range is fully covered with loaded tiles. @@ -124,7 +124,7 @@ TileSource.prototype.forEachLoadedTile = function(projection, z, tileRange, call tileCoordKey = getKeyZXY(z, x, y); loaded = false; if (tileCache.containsKey(tileCoordKey)) { - tile = /** @type {!ol.Tile} */ (tileCache.get(tileCoordKey)); + tile = /** @type {!module:ol/Tile~Tile} */ (tileCache.get(tileCoordKey)); loaded = tile.getState() === TileState.LOADED; if (loaded) { loaded = (callback(tile) !== false); @@ -195,7 +195,7 @@ TileSource.prototype.getResolutions = function() { * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. */ TileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {}; @@ -225,7 +225,7 @@ TileSource.prototype.getTileGridForProjection = function(projection) { /** * @param {module:ol/proj/Projection~Projection} projection Projection. - * @return {ol.TileCache} Tile cache. + * @return {module:ol/TileCache~TileCache} Tile cache. * @protected */ TileSource.prototype.getTileCacheForProjection = function(projection) { @@ -313,10 +313,10 @@ TileSource.prototype.useTile = UNDEFINED; * type. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.source.Tile.Event} * @param {string} type Type. - * @param {ol.Tile} tile The tile. + * @param {module:ol/Tile~Tile} tile The tile. */ export const TileSourceEvent = function(type, tile) { @@ -324,7 +324,7 @@ export const TileSourceEvent = function(type, tile) { /** * The tile related to the event. - * @type {ol.Tile} + * @type {module:ol/Tile~Tile} * @api */ this.tile = tile; diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js index 1c5144f6c1..5860b67ed3 100644 --- a/src/ol/source/TileDebug.js +++ b/src/ol/source/TileDebug.js @@ -12,7 +12,7 @@ import {getKeyZXY} from '../tilecoord.js'; /** * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/size~Size} tileSize Tile size. * @param {string} text Text. diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 0ebcea0e48..f4c5dada73 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -61,7 +61,7 @@ const TileImage = function(options) { /** * @protected - * @type {!Object.} + * @type {!Object.} */ this.tileCacheForProjection = {}; @@ -206,7 +206,7 @@ TileImage.prototype.getTileCacheForProjection = function(projection) { * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. * @param {string} key The key set on the tile. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. * @private */ TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) { @@ -243,7 +243,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { let tile; const tileCoordKey = getKey(tileCoord); if (cache.containsKey(tileCoordKey)) { - tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey)); + tile = /** @type {!module:ol/Tile~Tile} */ (cache.get(tileCoordKey)); } const key = this.getKey(); if (tile && tile.key == key) { @@ -283,7 +283,7 @@ TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) { * @param {number} y Tile coordinate y. * @param {number} pixelRatio Pixel ratio. * @param {!module:ol/proj/Projection~Projection} projection Projection. - * @return {!ol.Tile} Tile. + * @return {!module:ol/Tile~Tile} Tile. * @protected */ TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) { diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js index f8f227fdae..b13c6d4300 100644 --- a/src/ol/source/TileUTFGrid.js +++ b/src/ol/source/TileUTFGrid.js @@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; /** * @constructor - * @extends {ol.Tile} + * @extends {module:ol/Tile~Tile} * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/TileState~TileState} state State. * @param {string} src Image source URI. @@ -449,7 +449,7 @@ UTFGrid.prototype.handleTileJSONResponse = function(tileJSON) { UTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey)); + return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey)); } else { const tileCoord = [z, x, y]; const urlTileCoord = diff --git a/src/ol/source/UrlTile.js b/src/ol/source/UrlTile.js index 70f0904957..7c43c8bc91 100644 --- a/src/ol/source/UrlTile.js +++ b/src/ol/source/UrlTile.js @@ -112,11 +112,11 @@ UrlTile.prototype.getUrls = function() { /** * Handle tile change events. - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. * @protected */ UrlTile.prototype.handleTileChange = function(event) { - const tile = /** @type {ol.Tile} */ (event.target); + const tile = /** @type {module:ol/Tile~Tile} */ (event.target); const uid = getUid(tile); const tileState = tile.getState(); let type; diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index 02b3d9337e..ca4d115dc9 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -28,7 +28,7 @@ import RBush from '../structs/RBush.js'; * type. * * @constructor - * @extends {ol.events.Event} + * @extends {module:ol/events/Event~Event} * @implements {oli.source.Vector.Event} * @param {string} type Type. * @param {module:ol/Feature~Feature=} opt_feature Feature. @@ -690,7 +690,7 @@ VectorSource.prototype.getUrl = function() { /** - * @param {ol.events.Event} event Event. + * @param {module:ol/events/Event~Event} event Event. * @private */ VectorSource.prototype.handleFeatureChange_ = function(event) { diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index 8196490add..ebccee5377 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -98,7 +98,7 @@ VectorTileSource.prototype.getOverlaps = function() { }; /** - * clear {@link ol.TileCache} and delete all source tiles + * clear {@link module:ol/TileCache~TileCache} and delete all source tiles * @api */ VectorTileSource.prototype.clear = function() { @@ -112,7 +112,7 @@ VectorTileSource.prototype.clear = function() { VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) { const tileCoordKey = getKeyZXY(z, x, y); if (this.tileCache.containsKey(tileCoordKey)) { - return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey)); + return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey)); } else { const tileCoord = [z, x, y]; const urlTileCoord = this.getTileCoordForTileUrlFunction( diff --git a/src/ol/structs/LRUCache.js b/src/ol/structs/LRUCache.js index e16e9fa88b..944fc71994 100644 --- a/src/ol/structs/LRUCache.js +++ b/src/ol/structs/LRUCache.js @@ -12,7 +12,7 @@ import EventType from '../events/EventType.js'; * items from the cache is the responsibility of the user. * @constructor * @extends {module:ol/events/EventTarget~EventTarget} - * @fires ol.events.Event + * @fires module:ol/events/Event~Event * @struct * @template T * @param {number=} opt_highWaterMark High water mark. diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index aa64a9f50b..b235926f86 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -215,7 +215,7 @@ ImageStyle.prototype.setSnapToPixel = function(snapToPixel) { /** * @abstract - * @param {function(this: T, ol.events.Event)} listener Listener function. + * @param {function(this: T, module:ol/events/Event~Event)} listener Listener function. * @param {T} thisArg Value to use as `this` when executing `listener`. * @return {module:ol/events~EventsKey|undefined} Listener key. * @template T @@ -232,7 +232,7 @@ ImageStyle.prototype.load = function() {}; /** * @abstract - * @param {function(this: T, ol.events.Event)} listener Listener function. + * @param {function(this: T, module:ol/events/Event~Event)} listener Listener function. * @param {T} thisArg Value to use as `this` when executing `listener`. * @template T */ diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index ad1fa4e681..8ab6e95cb3 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -236,13 +236,13 @@ ol.RegularShapeRenderOptions; /** - * @typedef {function(module:ol/extent~Extent, number, number) : ol.ImageBase} + * @typedef {function(module:ol/extent~Extent, number, number) : module:ol/ImageBase~ImageBase} */ ol.ReprojImageFunctionType; /** - * @typedef {function(number, number, number, number) : ol.Tile} + * @typedef {function(number, number, number, number) : module:ol/Tile~Tile} */ ol.ReprojTileFunctionType;