Merge pull request #7998 from fredj/jsdoc_module

More Jsdoc module fixes
This commit is contained in:
Frédéric Junod
2018-03-19 15:47:07 +01:00
committed by GitHub
45 changed files with 114 additions and 123 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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`.
*/

View File

@@ -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.<ol.style.Style>|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.<ol.style.Style>} [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.
*/

View File

@@ -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.
*/

View File

@@ -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.<string>|undefined} layers Names of the TopoJSON topology's
* @property {Array.<string>} [layers] Names of the TopoJSON topology's
* `objects`'s children to read features from. If not provided, features will
* be read from all children.
*/

View File

@@ -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.
*/

View File

@@ -14,14 +14,14 @@ import {get as getProjection} from '../proj.js';
/**
* @typedef {Object} Options
* @property {Array.<function(new: ol.format.Feature)>|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.<function(new: ol.format.Feature)>} [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.

View File

@@ -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.
*/

View File

@@ -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.
*/
*/
/**

View File

@@ -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.
*/

View File

@@ -35,12 +35,12 @@ import RBush from '../structs/RBush.js';
/**
* @typedef {Object} Options
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>|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.<module:ol/Feature~Feature>} [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
*/

View File

@@ -39,16 +39,16 @@ const TranslateEventType = {
/**
* @typedef {Object} interaction_TranslateOptions
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>|undefined} features Only features contained in this collection will be able to be translated. If
* @property {module:ol/Collection~Collection.<module:ol/Feature~Feature>} [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.<module:ol/layer/Layer~Layer>|function(module:ol/layer/Layer~Layer): boolean} layers A list of layers from which features should be
* @property {Array.<module:ol/layer/Layer~Layer>|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.
*/

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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.<string, ?>=} opt_eventDict An optional dictionary of

View File

@@ -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.

View File

@@ -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.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
* tiles by zoom level.
* @param {Object.<number, Object.<string, module:ol/Tile~Tile>>} 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

View File

@@ -27,7 +27,7 @@ const CanvasImageLayerRenderer = function(imageLayer) {
/**
* @private
* @type {?ol.ImageBase}
* @type {?module:ol/ImageBase~ImageBase}
*/
this.image_ = null;

View File

@@ -48,7 +48,7 @@ const CanvasTileLayerRenderer = function(tileLayer) {
/**
* @protected
* @type {!Array.<ol.Tile>}
* @type {!Array.<module:ol/Tile~Tile>}
*/
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.<number, Object.<string, ol.Tile>>}
* @type {Object.<number, Object.<string, module:ol/Tile~Tile>>}
*/
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.

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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

View File

@@ -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.
*/

View File

@@ -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) {

View File

@@ -242,7 +242,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
gl.uniform1i(this.locations_.u_texture, 0);
/**
* @type {Object.<number, Object.<string, ol.Tile>>}
* @type {Object.<number, Object.<string, module:ol/Tile~Tile>>}
*/
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 &&

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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.<ol.Tile>}
* @type {!Array.<module:ol/Tile~Tile>}
*/
this.sourceTiles_ = [];

View File

@@ -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) {

View File

@@ -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() {

View File

@@ -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;

View File

@@ -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.

View File

@@ -61,7 +61,7 @@ const TileImage = function(options) {
/**
* @protected
* @type {!Object.<string, ol.TileCache>}
* @type {!Object.<string, module:ol/TileCache~TileCache>}
*/
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) {

View File

@@ -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 =

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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(

View File

@@ -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.

View File

@@ -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
*/

View File

@@ -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;