Merge pull request #7998 from fredj/jsdoc_module
More Jsdoc module fixes
This commit is contained in:
@@ -25,7 +25,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
|
|||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {string} [className='ol-mouse-position'] CSS class name.
|
* @property {string} [className='ol-mouse-position'] CSS class name.
|
||||||
* @property {module:ol/coordinate~CoordinateFormat} [coordinateFormat] Coordinate format.
|
* @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
|
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the
|
||||||
* control should be re-rendered. This is called in a `requestAnimationFrame`
|
* control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||||
* callback.
|
* callback.
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ReadOptions
|
* @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
|
* 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
|
* 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,
|
* can not be derived from the data and if no `defaultDataProjection` is set for a format,
|
||||||
* the features will not be reprojected.
|
* the features will not be reprojected.
|
||||||
* @property {module:ol/extent~Extent} extent Tile extent of the tile being read. This is only used and
|
* @property {module:ol/extent~Extent} extent Tile extent of the tile being read. This is only used and
|
||||||
* required for {@link ol.format.MVT}.
|
* 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
|
* created by the format reader. If not provided, features will be returned in the
|
||||||
* `dataProjection`.
|
* `dataProjection`.
|
||||||
*/
|
*/
|
||||||
@@ -23,11 +23,11 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} WriteOptions
|
* @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 not provided, the `defaultDataProjection` of the format is assigned (where set).
|
||||||
* If no `defaultDataProjection` is set for a format, the features will be returned
|
* If no `defaultDataProjection` is set for a format, the features will be returned
|
||||||
* in the `featureProjection`.
|
* 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
|
* 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.
|
* 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
|
* @property {boolean} [rightHanded] When writing geometries, follow the right-hand
|
||||||
|
|||||||
@@ -22,16 +22,14 @@ import {get as getProjection} from '../proj.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {ol.ProjectionLike} defaultDataProjection Default data projection.
|
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
|
||||||
* Default is `EPSG:4326`.
|
* @property {module:ol/proj~ProjectionLike} [featureProjection] Projection for features read or
|
||||||
* @property {ol.ProjectionLike} featureProjection Projection for features read or
|
|
||||||
* written by the format. Options passed to read or write methods will take precedence.
|
* 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 {string} [geometryName] Geometry name to use when creating features.
|
||||||
* @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include
|
* @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include
|
||||||
* the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader
|
* 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`
|
* 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.
|
* and a `geometryName` is provided, the `geometryName` will take precedence.
|
||||||
* Default is `false`.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -230,13 +230,11 @@ function createStyleDefaults() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {boolean|undefined} extractStyles Extract styles from the KML.
|
* @property {boolean} [extractStyles=true] Extract styles from the KML.
|
||||||
* Default is `true`.
|
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
|
||||||
* @property {boolean|undefined} showPointNames Show names as labels for placemarks
|
* @property {Array.<ol.style.Style>} [defaultStyle] Default style. The
|
||||||
* which contain points. Default is `true`.
|
|
||||||
* @property {Array.<ol.style.Style>|undefined} defaultStyle Default style. The
|
|
||||||
* default default style is the same as Google Earth.
|
* 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,9 @@ import {get as getProjection} from '../proj.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {number|undefined} factor The factor by which the coordinates
|
* @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.
|
||||||
* values will be scaled. Default is `1e5`.
|
* @property {module:ol/geom/GeometryLayout~GeometryLayout} [geometryLayout='XY'] Layout of the
|
||||||
* @property {module:ol/geom/GeometryLayout~GeometryLayout|undefined} geometryLayout Layout of the
|
* feature geometries created by the format reader.
|
||||||
* feature geometries created by the format reader. Default is `module:ol/geom/GeometryLayout~GeometryLayout.XY`.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,8 @@ import {get as getProjection} from '../proj.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {ol.ProjectionLike} defaultDataProjection Default data projection.
|
* @property {module:ol/proj~ProjectionLike} [defaultDataProjection='EPSG:4326'] Default data projection.
|
||||||
* Default is `EPSG:4326`.
|
* @property {string} [layerName] Set the name of the TopoJSON topology
|
||||||
* @property {string|undefined} layerName Set the name of the TopoJSON topology
|
|
||||||
* `objects`'s children as feature property with the specified name. This means
|
* `objects`'s children as feature property with the specified name. This means
|
||||||
* that when set to `'layer'`, a topology like
|
* 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'`.
|
* will result in features that have a property `'layer'` set to `'example'`.
|
||||||
* When not set, no property will be added to features.
|
* 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
|
* `objects`'s children to read features from. If not provided, features will
|
||||||
* be read from all children.
|
* be read from all children.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import Interaction, {zoomByDelta} from '../interaction/Interaction.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {number} [duration] Animation duration in milliseconds. Default is `250`.
|
* @property {number} [duration=250] Animation duration in milliseconds.
|
||||||
* @property {number} [delta] The zoom delta applied on each double click, default is `1`.
|
* @property {number} [delta=1] The zoom delta applied on each double click.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ import {get as getProjection} from '../proj.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {Array.<function(new: ol.format.Feature)>|undefined} formatConstructors Format constructors.
|
* @property {Array.<function(new: ol.format.Feature)>} [formatConstructors] Format constructors.
|
||||||
* @property {ol.source.Vector|undefined} source Optional vector source where features will be added. If a source is provided
|
* @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
|
* 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
|
* 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
|
* source without removing the existing features (append only), instead of
|
||||||
* providing the source option listen for the "addfeatures" event.
|
* 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 {module:ol/proj~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 {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.
|
* of this type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.interaction.DragAndDropEvent}
|
* @implements {oli.interaction.DragAndDropEvent}
|
||||||
* @param {module:ol/interaction/DragAndDrop~DragAndDropEventType} type Type.
|
* @param {module:ol/interaction/DragAndDrop~DragAndDropEventType} type Type.
|
||||||
* @param {File} file File.
|
* @param {File} file File.
|
||||||
|
|||||||
@@ -20,13 +20,13 @@ import RenderBox from '../render/Box.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {string|undefined} className CSS class name for styling the box. The default is `ol-dragbox`.
|
* @property {string} [className='ol-dragbox'] CSS class name for styling the box.
|
||||||
* @property {module:ol/events/condition~Condition|undefined} condition A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
|
* @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.
|
* to indicate whether that event should be handled.
|
||||||
* Default is {@link ol/events/condition~always}.
|
* 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
|
* @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default
|
||||||
* `boxEndCondition` function. Default is `64`.
|
* `boxEndCondition` function.
|
||||||
* @property {module:ol/interaction/DragBox~EndCondition|undefined} boxEndCondition A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
|
* @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.
|
* {@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.
|
* Default is `true` if the area of the box is bigger than the `minArea` option.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {disable} from '../rotationconstraint.js';
|
|||||||
* @property {number} [duration=250] The duration of the animation in
|
* @property {number} [duration=250] The duration of the animation in
|
||||||
* milliseconds.
|
* milliseconds.
|
||||||
* @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.
|
* @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const handleMoveEvent = UNDEFINED;
|
|||||||
* also during a drag sequence (so during a drag sequence both the
|
* also during a drag sequence (so during a drag sequence both the
|
||||||
* `handleDragEvent` function and this function are called).
|
* `handleDragEvent` function and this function are called).
|
||||||
* @property {(function(module:ol/MapBrowserPointerEvent~MapBrowserPointerEvent):boolean)} [handleUpEvent]
|
* @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.
|
* current drag sequence is stopped.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -35,12 +35,12 @@ import RBush from '../structs/RBush.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @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 {module:ol/Collection~Collection.<module:ol/Feature~Feature>} [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} [edge=true] Snap to edges.
|
||||||
* @property {boolean|undefined} vertex Snap to vertices. Default is `true`.
|
* @property {boolean} [vertex=true] Snap to vertices.
|
||||||
* @property {number|undefined} pixelTolerance Pixel tolerance for considering the pointer close enough to a segment or
|
* @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or
|
||||||
* vertex for snapping. Default is `10` pixels.
|
* vertex for snapping.
|
||||||
* @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/source/Vector~Vector} [source] Snap to features from this source. Either this option or features should be provided
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,16 +39,16 @@ const TranslateEventType = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} interaction_TranslateOptions
|
* @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.
|
* 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
|
* translated. Alternatively, a filter function can be provided. The
|
||||||
* function will be called for each layer in the map and should return
|
* 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
|
* `true` for layers that you want to be translatable. If the option is
|
||||||
* absent, all visible layers will be considered translatable.
|
* 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
|
* will be checked for features. This only works for the canvas renderer and
|
||||||
* not for WebGL. Default is `0`.
|
* not for WebGL.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ const BaseLayer = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
* @type {ol.LayerType}
|
* @type {module:ol/LayerType~LayerType}
|
||||||
* @protected;
|
* @protected;
|
||||||
*/
|
*/
|
||||||
this.type;
|
this.type;
|
||||||
@@ -65,7 +65,7 @@ inherits(BaseLayer, BaseObject);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the layer type (used when creating a layer renderer).
|
* 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() {
|
BaseLayer.prototype.getType = function() {
|
||||||
return this.type;
|
return this.type;
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ LayerGroup.prototype.handleLayerChange_ = function() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.events.Event} event Event.
|
* @param {module:ol/events/Event~Event} event Event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const ImageLayer = function(opt_options) {
|
|||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.LayerType}
|
* @type {module:ol/LayerType~LayerType}
|
||||||
*/
|
*/
|
||||||
this.type = LayerType.IMAGE;
|
this.type = LayerType.IMAGE;
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const TileLayer = function(opt_options) {
|
|||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.LayerType}
|
* @type {module:ol/LayerType~LayerType}
|
||||||
*/
|
*/
|
||||||
this.type = LayerType.TILE;
|
this.type = LayerType.TILE;
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ const VectorLayer = function(opt_options) {
|
|||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.LayerType}
|
* @type {module:ol/LayerType~LayerType}
|
||||||
*/
|
*/
|
||||||
this.type = LayerType.VECTOR;
|
this.type = LayerType.VECTOR;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const VectorTileLayer = function(opt_options) {
|
|||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.LayerType}
|
* @type {module:ol/LayerType~LayerType}
|
||||||
*/
|
*/
|
||||||
this.type = LayerType.VECTOR_TILE;
|
this.type = LayerType.VECTOR_TILE;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import Event from '../events/Event.js';
|
|||||||
* touch events and even native pointer events.
|
* touch events and even native pointer events.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @param {string} type The type of the event to create.
|
* @param {string} type The type of the event to create.
|
||||||
* @param {Event} originalEvent The event.
|
* @param {Event} originalEvent The event.
|
||||||
* @param {Object.<string, ?>=} opt_eventDict An optional dictionary of
|
* @param {Object.<string, ?>=} opt_eventDict An optional dictionary of
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Event from '../events/Event.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.render.Event}
|
* @implements {oli.render.Event}
|
||||||
* @param {ol.render.EventType} type Type.
|
* @param {ol.render.EventType} type Type.
|
||||||
* @param {ol.render.VectorContext=} opt_vectorContext Vector context.
|
* @param {ol.render.VectorContext=} opt_vectorContext Vector context.
|
||||||
|
|||||||
@@ -57,11 +57,9 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
|
|||||||
* Create a function that adds loaded tiles to the tile lookup.
|
* Create a function that adds loaded tiles to the tile lookup.
|
||||||
* @param {ol.source.Tile} source Tile source.
|
* @param {ol.source.Tile} source Tile source.
|
||||||
* @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
|
* @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
|
||||||
* @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
|
* @param {Object.<number, Object.<string, module:ol/Tile~Tile>>} tiles Lookup of loaded tiles by zoom level.
|
||||||
* tiles by zoom level.
|
|
||||||
* @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be
|
* @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
|
* called with a zoom level and a tile range to add loaded tiles to the lookup.
|
||||||
* lookup.
|
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
|
LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
|
||||||
@@ -93,7 +91,7 @@ LayerRenderer.prototype.getLayer = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle changes in image state.
|
* Handle changes in image state.
|
||||||
* @param {ol.events.Event} event Image change event.
|
* @param {module:ol/events/Event~Event} event Image change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
LayerRenderer.prototype.handleImageChange_ = function(event) {
|
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
|
* Load the image if not already loaded, and register the image change
|
||||||
* listener if needed.
|
* listener if needed.
|
||||||
* @param {ol.ImageBase} image Image.
|
* @param {module:ol/ImageBase~ImageBase} image Image.
|
||||||
* @return {boolean} `true` if the image is already loaded, `false`
|
* @return {boolean} `true` if the image is already loaded, `false` otherwise.
|
||||||
* otherwise.
|
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
LayerRenderer.prototype.loadImage = function(image) {
|
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 {module:ol/extent~Extent} extent Extent.
|
||||||
* @param {number} currentZ Current Z.
|
* @param {number} currentZ Current Z.
|
||||||
* @param {number} preload Load low resolution tiles up to 'preload' levels.
|
* @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`.
|
* @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.
|
||||||
* @protected
|
* @protected
|
||||||
* @template T
|
* @template T
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const CanvasImageLayerRenderer = function(imageLayer) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.ImageBase}
|
* @type {?module:ol/ImageBase~ImageBase}
|
||||||
*/
|
*/
|
||||||
this.image_ = null;
|
this.image_ = null;
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const CanvasTileLayerRenderer = function(tileLayer) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {!Array.<ol.Tile>}
|
* @type {!Array.<module:ol/Tile~Tile>}
|
||||||
*/
|
*/
|
||||||
this.renderedTiles = [];
|
this.renderedTiles = [];
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.Tile} tile Tile.
|
* @param {module:ol/Tile~Tile} tile Tile.
|
||||||
* @return {boolean} Tile is drawable.
|
* @return {boolean} Tile is drawable.
|
||||||
*/
|
*/
|
||||||
CanvasTileLayerRenderer.prototype.isDrawableTile_ = function(tile) {
|
CanvasTileLayerRenderer.prototype.isDrawableTile_ = function(tile) {
|
||||||
@@ -151,7 +151,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState
|
|||||||
const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);
|
const tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Object.<number, Object.<string, ol.Tile>>}
|
* @type {Object.<number, Object.<string, module:ol/Tile~Tile>>}
|
||||||
*/
|
*/
|
||||||
const tilesToDrawByZ = {};
|
const tilesToDrawByZ = {};
|
||||||
tilesToDrawByZ[z] = {};
|
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/PluggableMap~FrameState} frameState Frame state.
|
||||||
* @param {module:ol/layer/Layer~State} layerState Layer state.
|
* @param {module:ol/layer/Layer~State} layerState Layer state.
|
||||||
* @param {number} x Left of the tile.
|
* @param {number} x Left of the tile.
|
||||||
|
|||||||
@@ -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) {
|
CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function(event) {
|
||||||
const layer = this.getLayer();
|
const layer = this.getLayer();
|
||||||
@@ -285,7 +285,7 @@ CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function(event) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle changes in image style state.
|
* 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
|
* @private
|
||||||
*/
|
*/
|
||||||
CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
|
|||||||
@@ -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) {
|
CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) {
|
||||||
const layer = this.getLayer();
|
const layer = this.getLayer();
|
||||||
@@ -351,7 +351,7 @@ CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function(event) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle changes in image style state.
|
* 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
|
* @private
|
||||||
*/
|
*/
|
||||||
CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
|||||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||||
* @param {ol.style.Style} style Style.
|
* @param {ol.style.Style} style Style.
|
||||||
* @param {number} squaredTolerance Squared tolerance.
|
* @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`.
|
* @param {T} thisArg Value to use as `this` when executing `listener`.
|
||||||
* @return {boolean} `true` if style is loading.
|
* @return {boolean} `true` if style is loading.
|
||||||
* @template T
|
* @template T
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) {
|
|||||||
/**
|
/**
|
||||||
* The last rendered image.
|
* The last rendered image.
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.ImageBase}
|
* @type {?module:ol/ImageBase~ImageBase}
|
||||||
*/
|
*/
|
||||||
this.image_ = null;
|
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
|
* @private
|
||||||
* @return {WebGLTexture} Texture.
|
* @return {WebGLTexture} Texture.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const WebGLMapRenderer = function(container, map) {
|
|||||||
* @return {string} Key.
|
* @return {string} Key.
|
||||||
*/
|
*/
|
||||||
function(element) {
|
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()) {
|
if (!this.tileTextureQueue_.isEmpty()) {
|
||||||
this.tileTextureQueue_.reprioritize();
|
this.tileTextureQueue_.reprioritize();
|
||||||
const element = this.tileTextureQueue_.dequeue();
|
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 tileSize = /** @type {module:ol/size~Size} */ (element[3]);
|
||||||
const tileGutter = /** @type {number} */ (element[4]);
|
const tileGutter = /** @type {number} */ (element[4]);
|
||||||
this.bindTileTexture(
|
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 {module:ol/size~Size} tileSize Tile size.
|
||||||
* @param {number} tileGutter Tile gutter.
|
* @param {number} tileGutter Tile gutter.
|
||||||
* @param {number} magFilter Mag filter.
|
* @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
|
* @protected
|
||||||
*/
|
*/
|
||||||
WebGLMapRenderer.prototype.handleWebGLContextLost = function(event) {
|
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.
|
* @return {boolean} Is tile texture loaded.
|
||||||
*/
|
*/
|
||||||
WebGLMapRenderer.prototype.isTileTextureLoaded = function(tile) {
|
WebGLMapRenderer.prototype.isTileTextureLoaded = function(tile) {
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
|
|||||||
gl.uniform1i(this.locations_.u_texture, 0);
|
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 = {};
|
const tilesToDrawByZ = {};
|
||||||
tilesToDrawByZ[z] = {};
|
tilesToDrawByZ[z] = {};
|
||||||
@@ -344,7 +344,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
|
|||||||
frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,
|
frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,
|
||||||
tileLayer.getPreload(),
|
tileLayer.getPreload(),
|
||||||
/**
|
/**
|
||||||
* @param {ol.Tile} tile Tile.
|
* @param {module:ol/Tile~Tile} tile Tile.
|
||||||
*/
|
*/
|
||||||
function(tile) {
|
function(tile) {
|
||||||
if (tile.getState() == TileState.LOADED &&
|
if (tile.getState() == TileState.LOADED &&
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ WebGLVectorLayerRenderer.prototype.forEachLayerAtPixel = function(pixel, frameSt
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle changes in image style state.
|
* 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
|
* @private
|
||||||
*/
|
*/
|
||||||
WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
* See {@link ol.source.Image}.
|
* See {@link ol.source.Image}.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @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} sourceProj Source projection (of the data).
|
||||||
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
||||||
* @param {module:ol/extent~Extent} targetExtent Target extent.
|
* @param {module:ol/extent~Extent} targetExtent Target extent.
|
||||||
@@ -75,7 +75,7 @@ const ReprojImage = function(sourceProj, targetProj,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.ImageBase}
|
* @type {module:ol/ImageBase~ImageBase}
|
||||||
*/
|
*/
|
||||||
this.sourceImage_ =
|
this.sourceImage_ =
|
||||||
getImageFunction(sourceExtent, sourceResolution, pixelRatio);
|
getImageFunction(sourceExtent, sourceResolution, pixelRatio);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
* See {@link ol.source.TileImage}.
|
* See {@link ol.source.TileImage}.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Tile}
|
* @extends {module:ol/Tile~Tile}
|
||||||
* @param {module:ol/proj/Projection~Projection} sourceProj Source projection.
|
* @param {module:ol/proj/Projection~Projection} sourceProj Source projection.
|
||||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} sourceTileGrid Source tile grid.
|
* @param {module:ol/tilegrid/TileGrid~TileGrid} sourceTileGrid Source tile grid.
|
||||||
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
* @param {module:ol/proj/Projection~Projection} targetProj Target projection.
|
||||||
@@ -82,7 +82,7 @@ const ReprojTile = function(sourceProj, sourceTileGrid,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {!Array.<ol.Tile>}
|
* @type {!Array.<module:ol/Tile~Tile>}
|
||||||
*/
|
*/
|
||||||
this.sourceTiles_ = [];
|
this.sourceTiles_ = [];
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ const ImageSourceEventType = {
|
|||||||
* type.
|
* type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.source.ImageEvent}
|
* @implements {oli.source.ImageEvent}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {ol.Image} image The image.
|
* @param {ol.Image} image The image.
|
||||||
@@ -140,7 +140,7 @@ ImageSource.prototype.findNearestResolution = function(resolution) {
|
|||||||
* @param {number} resolution Resolution.
|
* @param {number} resolution Resolution.
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
* @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) {
|
ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
|
||||||
const sourceProjection = this.getProjection();
|
const sourceProjection = this.getProjection();
|
||||||
@@ -184,7 +184,7 @@ ImageSource.prototype.getImage = function(extent, resolution, pixelRatio, projec
|
|||||||
* @param {number} resolution Resolution.
|
* @param {number} resolution Resolution.
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||||
* @return {ol.ImageBase} Single image.
|
* @return {module:ol/ImageBase~ImageBase} Single image.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {};
|
ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {};
|
||||||
@@ -192,7 +192,7 @@ ImageSource.prototype.getImageInternal = function(extent, resolution, pixelRatio
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle image change events.
|
* Handle image change events.
|
||||||
* @param {ol.events.Event} event Event.
|
* @param {module:ol/events/Event~Event} event Event.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ImageSource.prototype.handleImageChange = function(event) {
|
ImageSource.prototype.handleImageChange = function(event) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ const RasterEventType = {
|
|||||||
* type.
|
* type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.source.RasterEvent}
|
* @implements {oli.source.RasterEvent}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
|
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
|
||||||
@@ -129,7 +129,7 @@ const RasterSource = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.TileQueue}
|
* @type {module:ol/TileQueue~TileQueue}
|
||||||
*/
|
*/
|
||||||
this.tileQueue_ = new TileQueue(
|
this.tileQueue_ = new TileQueue(
|
||||||
function() {
|
function() {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ const TileSource = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {ol.TileCache}
|
* @type {module:ol/TileCache~TileCache}
|
||||||
*/
|
*/
|
||||||
this.tileCache = new TileCache(options.cacheSize);
|
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 {module:ol/proj/Projection~Projection} projection Projection.
|
||||||
* @param {number} z Zoom level.
|
* @param {number} z Zoom level.
|
||||||
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
|
* @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
|
* loaded tile. If the callback returns `false`, the tile will not be
|
||||||
* considered loaded.
|
* considered loaded.
|
||||||
* @return {boolean} The tile range is fully covered with loaded tiles.
|
* @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);
|
tileCoordKey = getKeyZXY(z, x, y);
|
||||||
loaded = false;
|
loaded = false;
|
||||||
if (tileCache.containsKey(tileCoordKey)) {
|
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;
|
loaded = tile.getState() === TileState.LOADED;
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
loaded = (callback(tile) !== false);
|
loaded = (callback(tile) !== false);
|
||||||
@@ -195,7 +195,7 @@ TileSource.prototype.getResolutions = function() {
|
|||||||
* @param {number} y Tile coordinate y.
|
* @param {number} y Tile coordinate y.
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
* @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) {};
|
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.
|
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||||
* @return {ol.TileCache} Tile cache.
|
* @return {module:ol/TileCache~TileCache} Tile cache.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
TileSource.prototype.getTileCacheForProjection = function(projection) {
|
TileSource.prototype.getTileCacheForProjection = function(projection) {
|
||||||
@@ -313,10 +313,10 @@ TileSource.prototype.useTile = UNDEFINED;
|
|||||||
* type.
|
* type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.source.Tile.Event}
|
* @implements {oli.source.Tile.Event}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {ol.Tile} tile The tile.
|
* @param {module:ol/Tile~Tile} tile The tile.
|
||||||
*/
|
*/
|
||||||
export const TileSourceEvent = function(type, tile) {
|
export const TileSourceEvent = function(type, tile) {
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ export const TileSourceEvent = function(type, tile) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The tile related to the event.
|
* The tile related to the event.
|
||||||
* @type {ol.Tile}
|
* @type {module:ol/Tile~Tile}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {getKeyZXY} from '../tilecoord.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Tile}
|
* @extends {module:ol/Tile~Tile}
|
||||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||||
* @param {module:ol/size~Size} tileSize Tile size.
|
* @param {module:ol/size~Size} tileSize Tile size.
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ const TileImage = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
* @type {!Object.<string, ol.TileCache>}
|
* @type {!Object.<string, module:ol/TileCache~TileCache>}
|
||||||
*/
|
*/
|
||||||
this.tileCacheForProjection = {};
|
this.tileCacheForProjection = {};
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ TileImage.prototype.getTileCacheForProjection = function(projection) {
|
|||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||||
* @param {string} key The key set on the tile.
|
* @param {string} key The key set on the tile.
|
||||||
* @return {!ol.Tile} Tile.
|
* @return {!module:ol/Tile~Tile} Tile.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
|
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;
|
let tile;
|
||||||
const tileCoordKey = getKey(tileCoord);
|
const tileCoordKey = getKey(tileCoord);
|
||||||
if (cache.containsKey(tileCoordKey)) {
|
if (cache.containsKey(tileCoordKey)) {
|
||||||
tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey));
|
tile = /** @type {!module:ol/Tile~Tile} */ (cache.get(tileCoordKey));
|
||||||
}
|
}
|
||||||
const key = this.getKey();
|
const key = this.getKey();
|
||||||
if (tile && tile.key == key) {
|
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} y Tile coordinate y.
|
||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @param {!module:ol/proj/Projection~Projection} projection Projection.
|
* @param {!module:ol/proj/Projection~Projection} projection Projection.
|
||||||
* @return {!ol.Tile} Tile.
|
* @return {!module:ol/Tile~Tile} Tile.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
|
TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Tile}
|
* @extends {module:ol/Tile~Tile}
|
||||||
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
* @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate.
|
||||||
* @param {module:ol/TileState~TileState} state State.
|
* @param {module:ol/TileState~TileState} state State.
|
||||||
* @param {string} src Image source URI.
|
* @param {string} src Image source URI.
|
||||||
@@ -449,7 +449,7 @@ UTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
|
|||||||
UTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
UTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||||
const tileCoordKey = getKeyZXY(z, x, y);
|
const tileCoordKey = getKeyZXY(z, x, y);
|
||||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||||
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey));
|
||||||
} else {
|
} else {
|
||||||
const tileCoord = [z, x, y];
|
const tileCoord = [z, x, y];
|
||||||
const urlTileCoord =
|
const urlTileCoord =
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ UrlTile.prototype.getUrls = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle tile change events.
|
* Handle tile change events.
|
||||||
* @param {ol.events.Event} event Event.
|
* @param {module:ol/events/Event~Event} event Event.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
UrlTile.prototype.handleTileChange = function(event) {
|
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 uid = getUid(tile);
|
||||||
const tileState = tile.getState();
|
const tileState = tile.getState();
|
||||||
let type;
|
let type;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import RBush from '../structs/RBush.js';
|
|||||||
* type.
|
* type.
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.events.Event}
|
* @extends {module:ol/events/Event~Event}
|
||||||
* @implements {oli.source.Vector.Event}
|
* @implements {oli.source.Vector.Event}
|
||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {module:ol/Feature~Feature=} opt_feature Feature.
|
* @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
|
* @private
|
||||||
*/
|
*/
|
||||||
VectorSource.prototype.handleFeatureChange_ = function(event) {
|
VectorSource.prototype.handleFeatureChange_ = function(event) {
|
||||||
|
|||||||
@@ -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
|
* @api
|
||||||
*/
|
*/
|
||||||
VectorTileSource.prototype.clear = function() {
|
VectorTileSource.prototype.clear = function() {
|
||||||
@@ -112,7 +112,7 @@ VectorTileSource.prototype.clear = function() {
|
|||||||
VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
VectorTileSource.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||||
const tileCoordKey = getKeyZXY(z, x, y);
|
const tileCoordKey = getKeyZXY(z, x, y);
|
||||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||||
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
return /** @type {!module:ol/Tile~Tile} */ (this.tileCache.get(tileCoordKey));
|
||||||
} else {
|
} else {
|
||||||
const tileCoord = [z, x, y];
|
const tileCoord = [z, x, y];
|
||||||
const urlTileCoord = this.getTileCoordForTileUrlFunction(
|
const urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import EventType from '../events/EventType.js';
|
|||||||
* items from the cache is the responsibility of the user.
|
* items from the cache is the responsibility of the user.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/events/EventTarget~EventTarget}
|
* @extends {module:ol/events/EventTarget~EventTarget}
|
||||||
* @fires ol.events.Event
|
* @fires module:ol/events/Event~Event
|
||||||
* @struct
|
* @struct
|
||||||
* @template T
|
* @template T
|
||||||
* @param {number=} opt_highWaterMark High water mark.
|
* @param {number=} opt_highWaterMark High water mark.
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ ImageStyle.prototype.setSnapToPixel = function(snapToPixel) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @abstract
|
* @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`.
|
* @param {T} thisArg Value to use as `this` when executing `listener`.
|
||||||
* @return {module:ol/events~EventsKey|undefined} Listener key.
|
* @return {module:ol/events~EventsKey|undefined} Listener key.
|
||||||
* @template T
|
* @template T
|
||||||
@@ -232,7 +232,7 @@ ImageStyle.prototype.load = function() {};
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @abstract
|
* @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`.
|
* @param {T} thisArg Value to use as `this` when executing `listener`.
|
||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -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;
|
ol.ReprojImageFunctionType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {function(number, number, number, number) : ol.Tile}
|
* @typedef {function(number, number, number, number) : module:ol/Tile~Tile}
|
||||||
*/
|
*/
|
||||||
ol.ReprojTileFunctionType;
|
ol.ReprojTileFunctionType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user