Merge pull request #8012 from fredj/jsdoc_module

More Jsdoc module fixes
This commit is contained in:
Frédéric Junod
2018-03-23 08:50:58 +01:00
committed by GitHub
50 changed files with 123 additions and 123 deletions
+2 -2
View File
@@ -63,9 +63,9 @@ import {create as createTransform, apply as applyTransform} from './transform.js
/** /**
* @typedef {Object} AtPixelOptions * @typedef {Object} AtPixelOptions
* @property {((function(ol.layer.Layer): boolean)|undefined)} layerFilter Layer filter * @property {((function(module:ol/layer/Layer~Layer): boolean)|undefined)} layerFilter Layer filter
* function. The filter function will receive one argument, the * function. The filter function will receive one argument, the
* {@link ol.layer.Layer layer-candidate} and it should return a boolean value. * {@link module:ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.
* Only layers which are visible and for which this function returns `true` * Only layers which are visible and for which this function returns `true`
* will be tested for features. By default, all visible layers will be tested. * will be tested for features. By default, all visible layers will be tested.
* @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels * @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels
+2 -2
View File
@@ -26,7 +26,7 @@ import {loadFeaturesXhr} from './featureloader.js';
* @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 {number} sourceRevision Source revision. * @param {number} sourceRevision Source revision.
* @param {module:ol/format/Feature~Feature} format Feature format. * @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function. * @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
* @param {module:ol/tilecoord~TileCoord} urlTileCoord Wrapped tile coordinate for source urls. * @param {module:ol/tilecoord~TileCoord} urlTileCoord Wrapped tile coordinate for source urls.
* @param {module:ol/Tile~UrlFunction} tileUrlFunction Tile url function. * @param {module:ol/Tile~UrlFunction} tileUrlFunction Tile url function.
@@ -36,7 +36,7 @@ import {loadFeaturesXhr} from './featureloader.js';
* @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 {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string, * @param {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
* module:ol/format/Feature~Feature, module:ol/Tile~LoadFunction)} tileClass Class to * module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)} tileClass Class to
* instantiate for source tiles. * instantiate for source tiles.
* @param {function(this: module:ol/source/VectorTile~VectorTile, module:ol/events/Event~Event)} handleTileChange * @param {function(this: module:ol/source/VectorTile~VectorTile, module:ol/events/Event~Event)} handleTileChange
* Function to call when a source tile's state changes. * Function to call when a source tile's state changes.
+3 -3
View File
@@ -11,7 +11,7 @@ import TileState from './TileState.js';
* @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 Data source url. * @param {string} src Data source url.
* @param {module:ol/format/Feature~Feature} format Feature format. * @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function. * @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
* @param {module:ol/Tile~Options=} opt_options Tile options. * @param {module:ol/Tile~Options=} opt_options Tile options.
*/ */
@@ -32,7 +32,7 @@ const VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt
/** /**
* @private * @private
* @type {module:ol/format/Feature~Feature} * @type {module:ol/format/Feature~FeatureFormat}
*/ */
this.format_ = format; this.format_ = format;
@@ -108,7 +108,7 @@ VectorTile.prototype.getExtent = function() {
/** /**
* Get the feature format assigned for reading this tile's features. * Get the feature format assigned for reading this tile's features.
* @return {module:ol/format/Feature~Feature} Feature format. * @return {module:ol/format/Feature~FeatureFormat} Feature format.
* @api * @api
*/ */
VectorTile.prototype.getFormat = function() { VectorTile.prototype.getFormat = function() {
+3 -3
View File
@@ -45,7 +45,7 @@ const MIN_RATIO = 0.1;
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not. * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
* @property {string|Element} [label='»'] Text label to use for the collapsed * @property {string|Element} [label='»'] Text label to use for the collapsed
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array.<ol.layer.Layer>|module:ol/Collection~Collection.<ol.layer.Layer>} [layers] * @property {Array.<module:ol/layer/Layer~Layer>|module:ol/Collection~Collection.<module:ol/layer/Layer~Layer>} [layers]
* Layers for the overview map. If not set, then all main map layers are used * Layers for the overview map. If not set, then all main map layers are used
* instead. * instead.
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control * @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
@@ -149,7 +149,7 @@ const OverviewMap = function(opt_options) {
if (options.layers) { if (options.layers) {
options.layers.forEach( options.layers.forEach(
/** /**
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
*/ */
function(layer) { function(layer) {
ovmap.addLayer(layer); ovmap.addLayer(layer);
@@ -161,7 +161,7 @@ const OverviewMap = function(opt_options) {
box.style.boxSizing = 'border-box'; box.style.boxSizing = 'border-box';
/** /**
* @type {ol.Overlay} * @type {module:ol/Overlay~Overlay}
* @private * @private
*/ */
this.boxOverlay_ = new Overlay({ this.boxOverlay_ = new Overlay({
+2 -2
View File
@@ -38,7 +38,7 @@ import FormatType from './format/FormatType.js';
/** /**
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service. * @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~Feature} format Feature format. * @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @param {function(this:module:ol/VectorTile~VectorTile, Array.<module:ol/Feature~Feature>, module:ol/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature~Feature>)} success * @param {function(this:module:ol/VectorTile~VectorTile, Array.<module:ol/Feature~Feature>, module:ol/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.<module:ol/Feature~Feature>)} success
* Function called with the loaded features and optionally with the data * Function called with the loaded features and optionally with the data
* projection. Called with the vector tile or source as `this`. * projection. Called with the vector tile or source as `this`.
@@ -111,7 +111,7 @@ export function loadFeaturesXhr(url, format, success, failure) {
* loads features (with XHR), parses the features, and adds them to the * loads features (with XHR), parses the features, and adds them to the
* vector source. * vector source.
* @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service. * @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service.
* @param {module:ol/format/Feature~Feature} format Feature format. * @param {module:ol/format/Feature~FeatureFormat} format Feature format.
* @return {module:ol/featureloader~FeatureLoader} The feature loader. * @return {module:ol/featureloader~FeatureLoader} The feature loader.
* @api * @api
*/ */
+1 -1
View File
@@ -59,7 +59,7 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;
* Feature format for reading and writing data in the EsriJSON format. * Feature format for reading and writing data in the EsriJSON format.
* *
* @constructor * @constructor
* @extends {ol.format.JSONFeature} * @extends {module:ol/format/JSONFeature~JSONFeature}
* @param {module:ol/format/EsriJSON~Options=} opt_options Options. * @param {module:ol/format/EsriJSON~Options=} opt_options Options.
* @api * @api
*/ */
+2 -2
View File
@@ -52,7 +52,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
* Abstract base class; normally only used for creating subclasses and not * Abstract base class; normally only used for creating subclasses and not
* instantiated in apps. * instantiated in apps.
* Base class for feature formats. * Base class for feature formats.
* {ol.format.Feature} subclasses provide the ability to decode and encode * {module:ol/format/Feature~FeatureFormat} subclasses provide the ability to decode and encode
* {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial
* file formats. See the documentation for each format for more details. * file formats. See the documentation for each format for more details.
* *
@@ -125,7 +125,7 @@ FeatureFormat.prototype.getLastExtent = function() {
/** /**
* @abstract * @abstract
* @return {ol.format.FormatType} Format. * @return {module:ol/format/FormatType~FormatType} Format.
*/ */
FeatureFormat.prototype.getType = function() {}; FeatureFormat.prototype.getType = function() {};
+1 -1
View File
@@ -74,7 +74,7 @@ export const GMLNS = 'http://www.opengis.net/gml';
* @abstract * @abstract
* @param {module:ol/format/GMLBase~Options=} opt_options * @param {module:ol/format/GMLBase~Options=} opt_options
* Optional configuration object. * Optional configuration object.
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
*/ */
const GMLBase = function(opt_options) { const GMLBase = function(opt_options) {
const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {}); const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {});
+1 -1
View File
@@ -39,7 +39,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender
* Feature format for reading and writing data in the GPX format. * Feature format for reading and writing data in the GPX format.
* *
* @constructor * @constructor
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
* @param {module:ol/format/GPX~Options=} opt_options Options. * @param {module:ol/format/GPX~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -38,7 +38,7 @@ import {get as getProjection} from '../proj.js';
* Feature format for reading and writing data in the GeoJSON format. * Feature format for reading and writing data in the GeoJSON format.
* *
* @constructor * @constructor
* @extends {ol.format.JSONFeature} * @extends {module:ol/format/JSONFeature~JSONFeature}
* @param {module:ol/format/GeoJSON~Options=} opt_options Options. * @param {module:ol/format/GeoJSON~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -32,7 +32,7 @@ const IGCZ = {
* Feature format for `*.igc` flight recording files. * Feature format for `*.igc` flight recording files.
* *
* @constructor * @constructor
* @extends {ol.format.TextFeature} * @extends {module:ol/format/TextFeature~TextFeature}
* @param {module:ol/format/IGC~Options=} opt_options Options. * @param {module:ol/format/IGC~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.format.Feature} * @extends {module:ol/format/Feature~FeatureFormat}
*/ */
const JSONFeature = function() { const JSONFeature = function() {
FeatureFormat.call(this); FeatureFormat.call(this);
+3 -3
View File
@@ -260,7 +260,7 @@ function createStyleDefaults() {
* which do not support this will need a URL polyfill to be loaded before use. * which do not support this will need a URL polyfill to be loaded before use.
* *
* @constructor * @constructor
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
* @param {module:ol/format/KML~Options=} opt_options Options. * @param {module:ol/format/KML~Options=} opt_options Options.
* @api * @api
*/ */
@@ -2217,7 +2217,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
* @param {Node} node Node. * @param {Node} node Node.
* @param {Array.<module:ol/Feature~Feature>} features Features. * @param {Array.<module:ol/Feature~Feature>} features Features.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @this {ol.format.KML} * @this {module:ol/format/KML~KML}
*/ */
function writeDocument(node, features, objectStack) { function writeDocument(node, features, objectStack) {
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
@@ -2670,7 +2670,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
* @param {Node} node Node. * @param {Node} node Node.
* @param {module:ol/Feature~Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {Array.<*>} objectStack Object stack. * @param {Array.<*>} objectStack Object stack.
* @this {ol.format.KML} * @this {module:ol/format/KML~KML}
*/ */
function writePlacemark(node, feature, objectStack) { function writePlacemark(node, feature, objectStack) {
const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node};
+1 -1
View File
@@ -43,7 +43,7 @@ import RenderFeature from '../render/Feature.js';
* Feature format for reading data in the Mapbox MVT format. * Feature format for reading data in the Mapbox MVT format.
* *
* @constructor * @constructor
* @extends {ol.format.Feature} * @extends {module:ol/format/Feature~FeatureFormat}
* @param {module:ol/format/MVT~Options=} opt_options Options. * @param {module:ol/format/MVT~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -21,7 +21,7 @@ import {pushParseAndPop, makeStructureNS} from '../xml.js';
* [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML). * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).
* *
* @constructor * @constructor
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
* @api * @api
*/ */
const OSMXML = function() { const OSMXML = function() {
+1 -1
View File
@@ -9,7 +9,7 @@ import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pus
/** /**
* @constructor * @constructor
* @extends {ol.format.XML} * @extends {module:ol/format/XML~XML}
*/ */
const OWS = function() { const OWS = function() {
XML.call(this); XML.call(this);
+1 -1
View File
@@ -28,7 +28,7 @@ import {get as getProjection} from '../proj.js';
* Polyline Algorithm Format. * Polyline Algorithm Format.
* *
* @constructor * @constructor
* @extends {ol.format.TextFeature} * @extends {module:ol/format/TextFeature~TextFeature}
* @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object. * @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object.
* @api * @api
*/ */
+1 -1
View File
@@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js';
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.format.Feature} * @extends {module:ol/format/Feature~FeatureFormat}
*/ */
const TextFeature = function() { const TextFeature = function() {
FeatureFormat.call(this); FeatureFormat.call(this);
+1 -1
View File
@@ -44,7 +44,7 @@ import {get as getProjection} from '../proj.js';
* Feature format for reading data in the TopoJSON format. * Feature format for reading data in the TopoJSON format.
* *
* @constructor * @constructor
* @extends {ol.format.JSONFeature} * @extends {module:ol/format/JSONFeature~JSONFeature}
* @param {module:ol/format/TopoJSON~Options=} opt_options Options. * @param {module:ol/format/TopoJSON~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -128,7 +128,7 @@ const DEFAULT_VERSION = '1.1.0';
* *
* @constructor * @constructor
* @param {module:ol/format/WFS~Options=} opt_options Optional configuration object. * @param {module:ol/format/WFS~Options=} opt_options Optional configuration object.
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
* @api * @api
*/ */
const WFS = function(opt_options) { const WFS = function(opt_options) {
+1 -1
View File
@@ -538,7 +538,7 @@ Parser.prototype.formatErrorMessage_ = function() {
* format. * format.
* *
* @constructor * @constructor
* @extends {ol.format.TextFeature} * @extends {module:ol/format/TextFeature~TextFeature}
* @param {module:ol/format/WKT~Options=} opt_options Options. * @param {module:ol/format/WKT~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -14,7 +14,7 @@ import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,
* Format for reading WMS capabilities data * Format for reading WMS capabilities data
* *
* @constructor * @constructor
* @extends {ol.format.XML} * @extends {module:ol/format/XML~XML}
* @api * @api
*/ */
const WMSCapabilities = function() { const WMSCapabilities = function() {
+1 -1
View File
@@ -22,7 +22,7 @@ import {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js';
* {@link ol.format.GML2} to read features. * {@link ol.format.GML2} to read features.
* *
* @constructor * @constructor
* @extends {ol.format.XMLFeature} * @extends {module:ol/format/XMLFeature~XMLFeature}
* @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options. * @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -15,7 +15,7 @@ import {pushParseAndPop, makeStructureNS,
* Format for reading WMTS capabilities data. * Format for reading WMTS capabilities data.
* *
* @constructor * @constructor
* @extends {ol.format.XML} * @extends {module:ol/format/XML~XML}
* @api * @api
*/ */
const WMTSCapabilities = function() { const WMTSCapabilities = function() {
+1 -1
View File
@@ -15,7 +15,7 @@ import {isDocument, isNode, parse} from '../xml.js';
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.format.Feature} * @extends {module:ol/format/Feature~FeatureFormat}
*/ */
const XMLFeature = function() { const XMLFeature = function() {
+4 -4
View File
@@ -14,7 +14,7 @@ import {get as getProjection} from '../proj.js';
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {Array.<function(new: ol.format.Feature)>} [formatConstructors] Format constructors. * @property {Array.<function(new: module:ol/format/Feature~FeatureFormat)>} [formatConstructors] Format constructors.
* @property {ol.source.Vector} [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
@@ -100,7 +100,7 @@ const DragAndDrop = function(opt_options) {
/** /**
* @private * @private
* @type {Array.<function(new: ol.format.Feature)>} * @type {Array.<function(new: module:ol/format/Feature~FeatureFormat)>}
*/ */
this.formatConstructors_ = options.formatConstructors ? this.formatConstructors_ = options.formatConstructors ?
options.formatConstructors : []; options.formatConstructors : [];
@@ -183,7 +183,7 @@ DragAndDrop.prototype.handleResult_ = function(file, event) {
*/ */
const formatConstructor = formatConstructors[i]; const formatConstructor = formatConstructors[i];
/** /**
* @type {ol.format.Feature} * @type {module:ol/format/Feature~FeatureFormat}
*/ */
const format = new formatConstructor(); const format = new formatConstructor();
features = this.tryReadFeatures_(format, result, { features = this.tryReadFeatures_(format, result, {
@@ -247,7 +247,7 @@ DragAndDrop.prototype.setMap = function(map) {
/** /**
* @param {ol.format.Feature} format Format. * @param {module:ol/format/Feature~FeatureFormat} format Format.
* @param {string} text Text. * @param {string} text Text.
* @param {module:ol/format/Feature~ReadOptions} options Read options. * @param {module:ol/format/Feature~ReadOptions} options Read options.
* @private * @private
+4 -4
View File
@@ -27,7 +27,7 @@ import {assign} from '../obj.js';
* @classdesc * @classdesc
* Abstract base class; normally only used for creating subclasses and not * Abstract base class; normally only used for creating subclasses and not
* instantiated in apps. * instantiated in apps.
* Note that with `ol.layer.Base` and all its subclasses, any property set in * Note that with `module:ol/layer/Base~BaseLayer` and all its subclasses, any property set in
* the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so * the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
* is observable, and has get/set accessors. * is observable, and has get/set accessors.
* *
@@ -63,7 +63,7 @@ const BaseLayer = function(options) {
* @private * @private
*/ */
this.state_ = /** @type {module:ol/layer/Layer~State} */ ({ this.state_ = /** @type {module:ol/layer/Layer~State} */ ({
layer: /** @type {ol.layer.Layer} */ (this), layer: /** @type {module:ol/layer/Layer~Layer} */ (this),
managed: true managed: true
}); });
@@ -106,9 +106,9 @@ BaseLayer.prototype.getLayerState = function() {
/** /**
* @abstract * @abstract
* @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be * @param {Array.<module:ol/layer/Layer~Layer>=} opt_array Array of layers (to be
* modified in place). * modified in place).
* @return {Array.<ol.layer.Layer>} Array of layers. * @return {Array.<module:ol/layer/Layer~Layer>} Array of layers.
*/ */
BaseLayer.prototype.getLayersArray = function(opt_array) {}; BaseLayer.prototype.getLayersArray = function(opt_array) {};
+10 -10
View File
@@ -31,7 +31,7 @@ const Property = {
* A generic `change` event is triggered when the group/Collection changes. * A generic `change` event is triggered when the group/Collection changes.
* *
* @constructor * @constructor
* @extends {ol.layer.Base} * @extends {module:ol/layer/Base~BaseLayer}
* @param {olx.layer.GroupOptions=} opt_options Layer options. * @param {olx.layer.GroupOptions=} opt_options Layer options.
* @api * @api
*/ */
@@ -125,7 +125,7 @@ LayerGroup.prototype.handleLayersChanged_ = function(event) {
* @private * @private
*/ */
LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) { LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element); const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
const key = getUid(layer).toString(); const key = getUid(layer).toString();
this.listenerKeys_[key] = [ this.listenerKeys_[key] = [
listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this), listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),
@@ -140,7 +140,7 @@ LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
* @private * @private
*/ */
LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) { LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
const layer = /** @type {ol.layer.Base} */ (collectionEvent.element); const layer = /** @type {module:ol/layer/Base~BaseLayer} */ (collectionEvent.element);
const key = getUid(layer).toString(); const key = getUid(layer).toString();
this.listenerKeys_[key].forEach(unlistenByKey); this.listenerKeys_[key].forEach(unlistenByKey);
delete this.listenerKeys_[key]; delete this.listenerKeys_[key];
@@ -149,23 +149,23 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
/** /**
* Returns the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers} * Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group. * in this group.
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of * @return {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} Collection of
* {@link ol.layer.Base layers} that are part of this group. * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable * @observable
* @api * @api
*/ */
LayerGroup.prototype.getLayers = function() { LayerGroup.prototype.getLayers = function() {
return /** @type {!module:ol/Collection~Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS)); return /** @type {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} */ (this.get(Property.LAYERS));
}; };
/** /**
* Set the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers} * Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group. * in this group.
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of * @param {!module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer>} layers Collection of
* {@link ol.layer.Base layers} that are part of this group. * {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable * @observable
* @api * @api
*/ */
+1 -1
View File
@@ -39,7 +39,7 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
* options means that `title` is observable, and has get/set accessors. * options means that `title` is observable, and has get/set accessors.
* *
* @constructor * @constructor
* @extends {ol.layer.Vector} * @extends {module:ol/layer/Vector~VectorLayer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.HeatmapOptions=} opt_options Options. * @param {olx.layer.HeatmapOptions=} opt_options Options.
* @api * @api
+1 -1
View File
@@ -14,7 +14,7 @@ import Layer from '../layer/Layer.js';
* options means that `title` is observable, and has get/set accessors. * options means that `title` is observable, and has get/set accessors.
* *
* @constructor * @constructor
* @extends {ol.layer.Layer} * @extends {module:ol/layer/Layer~Layer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.ImageOptions=} opt_options Layer options. * @param {olx.layer.ImageOptions=} opt_options Layer options.
* @api * @api
+2 -2
View File
@@ -37,13 +37,13 @@ import SourceState from '../source/State.js';
* Layers are usually added to a map with {@link ol.Map#addLayer}. Components * Layers are usually added to a map with {@link ol.Map#addLayer}. Components
* like {@link module:ol/interaction/Select~Select} use unmanaged layers * like {@link module:ol/interaction/Select~Select} use unmanaged layers
* internally. These unmanaged layers are associated with the map using * internally. These unmanaged layers are associated with the map using
* {@link ol.layer.Layer#setMap} instead. * {@link module:ol/layer/Layer~Layer#setMap} instead.
* *
* A generic `change` event is fired when the state of the source changes. * A generic `change` event is fired when the state of the source changes.
* *
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.layer.Base} * @extends {module:ol/layer/Base~BaseLayer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.LayerOptions} options Layer options. * @param {olx.layer.LayerOptions} options Layer options.
* @api * @api
+1 -1
View File
@@ -16,7 +16,7 @@ import {assign} from '../obj.js';
* options means that `title` is observable, and has get/set accessors. * options means that `title` is observable, and has get/set accessors.
* *
* @constructor * @constructor
* @extends {ol.layer.Layer} * @extends {module:ol/layer/Layer~Layer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.TileOptions=} opt_options Tile layer options. * @param {olx.layer.TileOptions=} opt_options Tile layer options.
* @api * @api
+3 -3
View File
@@ -26,7 +26,7 @@ const Property = {
* options means that `title` is observable, and has get/set accessors. * options means that `title` is observable, and has get/set accessors.
* *
* @constructor * @constructor
* @extends {ol.layer.Layer} * @extends {module:ol/layer/Layer~Layer}
* @fires ol.render.Event * @fires ol.render.Event
* @param {olx.layer.VectorOptions=} opt_options Options. * @param {olx.layer.VectorOptions=} opt_options Options.
* @api * @api
@@ -88,7 +88,7 @@ const VectorLayer = function(opt_options) {
/** /**
* @private * @private
* @type {ol.layer.VectorTileRenderType|string} * @type {module:ol/layer/VectorTileRenderType~VectorTileRenderType|string}
*/ */
this.renderMode_ = options.renderMode || VectorRenderType.VECTOR; this.renderMode_ = options.renderMode || VectorRenderType.VECTOR;
@@ -215,7 +215,7 @@ VectorLayer.prototype.setStyle = function(style) {
/** /**
* @return {ol.layer.VectorRenderType|string} The render mode. * @return {module:ol/layer/VectorRenderType~VectorRenderType|string} The render mode.
*/ */
VectorLayer.prototype.getRenderMode = function() { VectorLayer.prototype.getRenderMode = function() {
return this.renderMode_; return this.renderMode_;
+1 -1
View File
@@ -17,7 +17,7 @@ import {assign} from '../obj.js';
* options means that `title` is observable, and has get/set accessors. * options means that `title` is observable, and has get/set accessors.
* *
* @constructor * @constructor
* @extends {ol.layer.Vector} * @extends {module:ol/layer/Vector~VectorLayer}
* @param {olx.layer.VectorTileOptions=} opt_options Options. * @param {olx.layer.VectorTileOptions=} opt_options Options.
* @api * @api
*/ */
+1 -1
View File
@@ -490,7 +490,7 @@ CanvasImmediateRenderer.prototype.drawGeometry = function(geometry) {
* Render a feature into the canvas. Note that any `zIndex` on the provided * Render a feature into the canvas. Note that any `zIndex` on the provided
* style will be ignored - features are rendered immediately in the order that * style will be ignored - features are rendered immediately in the order that
* this method is called. If you need `zIndex` support, you should be using an * this method is called. If you need `zIndex` support, you should be using an
* {@link ol.layer.Vector} instead. * {@link module:ol/layer/Vector~VectorLayer} instead.
* *
* @param {module:ol/Feature~Feature} feature Feature. * @param {module:ol/Feature~Feature} feature Feature.
* @param {ol.style.Style} style Style. * @param {ol.style.Style} style Style.
+4 -4
View File
@@ -13,7 +13,7 @@ import SourceState from '../source/State.js';
/** /**
* @constructor * @constructor
* @extends {module:ol/Observable~Observable} * @extends {module:ol/Observable~Observable}
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
* @struct * @struct
*/ */
const LayerRenderer = function(layer) { const LayerRenderer = function(layer) {
@@ -22,7 +22,7 @@ const LayerRenderer = function(layer) {
/** /**
* @private * @private
* @type {ol.layer.Layer} * @type {module:ol/layer/Layer~Layer}
*/ */
this.layer_ = layer; this.layer_ = layer;
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {module:ol/PluggableMap~FrameState} frameState Frame state. * @param {module:ol/PluggableMap~FrameState} frameState Frame state.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), ol.layer.Layer): T} * @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), module:ol/layer/Layer~Layer): T}
* callback Feature callback. * callback Feature callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
@@ -82,7 +82,7 @@ LayerRenderer.prototype.createLoadedTileFinder = function(source, projection, ti
/** /**
* @return {ol.layer.Layer} Layer. * @return {module:ol/layer/Layer~Layer} Layer.
*/ */
LayerRenderer.prototype.getLayer = function() { LayerRenderer.prototype.getLayer = function() {
return this.layer_; return this.layer_;
+7 -7
View File
@@ -91,9 +91,9 @@ function expireIconCache(map, frameState) {
* @param {module:ol/PluggableMap~FrameState} frameState FrameState. * @param {module:ol/PluggableMap~FrameState} frameState FrameState.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), * @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature),
* ol.layer.Layer): T} callback Feature callback. * module:ol/layer/Layer~Layer): T} callback Feature callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter * @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
* function, only layers which are visible and for which this function * function, only layers which are visible and for which this function
* returns `true` will be tested for features. By default, all visible * returns `true` will be tested for features. By default, all visible
* layers will be tested. * layers will be tested.
@@ -109,7 +109,7 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
/** /**
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature. * @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
* @return {?} Callback result. * @return {?} Callback result.
*/ */
function forEachFeatureAtCoordinate(feature, layer) { function forEachFeatureAtCoordinate(feature, layer) {
@@ -159,10 +159,10 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
* @abstract * @abstract
* @param {module:ol~Pixel} pixel Pixel. * @param {module:ol~Pixel} pixel Pixel.
* @param {module:ol/PluggableMap~FrameState} frameState FrameState. * @param {module:ol/PluggableMap~FrameState} frameState FrameState.
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer * @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
* callback. * callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter * @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
* function, only layers which are visible and for which this function * function, only layers which are visible and for which this function
* returns `true` will be tested for features. By default, all visible * returns `true` will be tested for features. By default, all visible
* layers will be tested. * layers will be tested.
@@ -178,7 +178,7 @@ MapRenderer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {module:ol/PluggableMap~FrameState} frameState FrameState. * @param {module:ol/PluggableMap~FrameState} frameState FrameState.
* @param {number} hitTolerance Hit tolerance in pixels. * @param {number} hitTolerance Hit tolerance in pixels.
* @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter * @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
* function, only layers which are visible and for which this function * function, only layers which are visible and for which this function
* returns `true` will be tested for features. By default, all visible * returns `true` will be tested for features. By default, all visible
* layers will be tested. * layers will be tested.
@@ -195,7 +195,7 @@ MapRenderer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState,
/** /**
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
* @protected * @protected
* @return {ol.renderer.Layer} Layer renderer. * @return {ol.renderer.Layer} Layer renderer.
*/ */
+6 -6
View File
@@ -18,7 +18,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran
/** /**
* @constructor * @constructor
* @extends {ol.renderer.canvas.IntermediateCanvas} * @extends {ol.renderer.canvas.IntermediateCanvas}
* @param {ol.layer.Image} imageLayer Single image layer. * @param {module:ol/layer/Image~ImageLayer} imageLayer Single image layer.
* @api * @api
*/ */
const CanvasImageLayerRenderer = function(imageLayer) { const CanvasImageLayerRenderer = function(imageLayer) {
@@ -56,24 +56,24 @@ inherits(CanvasImageLayerRenderer, IntermediateCanvasRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
CanvasImageLayerRenderer['handles'] = function(type, layer) { CanvasImageLayerRenderer['handles'] = function(type, layer) {
return type === RendererType.CANVAS && (layer.getType() === LayerType.IMAGE || return type === RendererType.CANVAS && (layer.getType() === LayerType.IMAGE ||
layer.getType() === LayerType.VECTOR && layer.getType() === LayerType.VECTOR &&
/** @type {ol.layer.Vector} */ (layer).getRenderMode() === VectorRenderType.IMAGE); /** @type {module:ol/layer/Vector~VectorLayer} */ (layer).getRenderMode() === VectorRenderType.IMAGE);
}; };
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.canvas.ImageLayer} The layer renderer. * @return {ol.renderer.canvas.ImageLayer} The layer renderer.
*/ */
CanvasImageLayerRenderer['create'] = function(mapRenderer, layer) { CanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {
const renderer = new CanvasImageLayerRenderer(/** @type {ol.layer.Image} */ (layer)); const renderer = new CanvasImageLayerRenderer(/** @type {module:ol/layer/Image~ImageLayer} */ (layer));
if (layer.getType() === LayerType.VECTOR) { if (layer.getType() === LayerType.VECTOR) {
const candidates = getLayerRendererPlugins(); const candidates = getLayerRendererPlugins();
for (let i = 0, ii = candidates.length; i < ii; ++i) { for (let i = 0, ii = candidates.length; i < ii; ++i) {
@@ -127,7 +127,7 @@ CanvasImageLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
const viewResolution = viewState.resolution; const viewResolution = viewState.resolution;
let image; let image;
const imageLayer = /** @type {ol.layer.Image} */ (this.getLayer()); const imageLayer = /** @type {module:ol/layer/Image~ImageLayer} */ (this.getLayer());
const imageSource = imageLayer.getSource(); const imageSource = imageLayer.getSource();
const hints = frameState.viewHints; const hints = frameState.viewHints;
+1 -1
View File
@@ -13,7 +13,7 @@ import {create as createTransform, apply as applyTransform} from '../../transfor
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.renderer.canvas.Layer} * @extends {ol.renderer.canvas.Layer}
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
*/ */
const IntermediateCanvasRenderer = function(layer) { const IntermediateCanvasRenderer = function(layer) {
+2 -2
View File
@@ -15,7 +15,7 @@ import {create as createTransform, apply as applyTransform, compose as composeTr
* @constructor * @constructor
* @abstract * @abstract
* @extends {ol.renderer.Layer} * @extends {ol.renderer.Layer}
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
*/ */
const CanvasLayerRenderer = function(layer) { const CanvasLayerRenderer = function(layer) {
@@ -101,7 +101,7 @@ CanvasLayerRenderer.prototype.dispatchComposeEvent_ = function(type, context, fr
/** /**
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
* @param {module:ol/PluggableMap~FrameState} frameState FrameState. * @param {module:ol/PluggableMap~FrameState} frameState FrameState.
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer * @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
* callback. * callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
+5 -5
View File
@@ -15,7 +15,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran
/** /**
* @constructor * @constructor
* @extends {ol.renderer.canvas.IntermediateCanvas} * @extends {ol.renderer.canvas.IntermediateCanvas}
* @param {ol.layer.Tile|ol.layer.VectorTile} tileLayer Tile layer. * @param {module:ol/layer/Tile~TileLayer|module:ol/layer/VectorTile~VectorTile} tileLayer Tile layer.
* @api * @api
*/ */
const CanvasTileLayerRenderer = function(tileLayer) { const CanvasTileLayerRenderer = function(tileLayer) {
@@ -84,7 +84,7 @@ inherits(CanvasTileLayerRenderer, IntermediateCanvasRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
CanvasTileLayerRenderer['handles'] = function(type, layer) { CanvasTileLayerRenderer['handles'] = function(type, layer) {
@@ -95,11 +95,11 @@ CanvasTileLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.canvas.TileLayer} The layer renderer. * @return {ol.renderer.canvas.TileLayer} The layer renderer.
*/ */
CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) { CanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasTileLayerRenderer(/** @type {ol.layer.Tile} */ (layer)); return new CanvasTileLayerRenderer(/** @type {module:ol/layer/Tile~TileLayer} */ (layer));
}; };
@@ -348,7 +348,7 @@ CanvasTileLayerRenderer.prototype.getImage = function() {
/** /**
* @function * @function
* @return {ol.layer.Tile|ol.layer.VectorTile} * @return {module:ol/layer/Tile~TileLayer|module:ol/layer/VectorTile~VectorTile}
*/ */
CanvasTileLayerRenderer.prototype.getLayer; CanvasTileLayerRenderer.prototype.getLayer;
+7 -7
View File
@@ -19,7 +19,7 @@ import {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance,
/** /**
* @constructor * @constructor
* @extends {ol.renderer.canvas.Layer} * @extends {ol.renderer.canvas.Layer}
* @param {ol.layer.Vector} vectorLayer Vector layer. * @param {module:ol/layer/Vector~VectorLayer} vectorLayer Vector layer.
* @api * @api
*/ */
const CanvasVectorLayerRenderer = function(vectorLayer) { const CanvasVectorLayerRenderer = function(vectorLayer) {
@@ -89,7 +89,7 @@ inherits(CanvasVectorLayerRenderer, CanvasLayerRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
CanvasVectorLayerRenderer['handles'] = function(type, layer) { CanvasVectorLayerRenderer['handles'] = function(type, layer) {
@@ -100,11 +100,11 @@ CanvasVectorLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.canvas.VectorLayer} The layer renderer. * @return {ol.renderer.canvas.VectorLayer} The layer renderer.
*/ */
CanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) { CanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasVectorLayerRenderer(/** @type {ol.layer.Vector} */ (layer)); return new CanvasVectorLayerRenderer(/** @type {module:ol/layer/Vector~VectorLayer} */ (layer));
}; };
@@ -147,7 +147,7 @@ CanvasVectorLayerRenderer.prototype.composeFrame = function(frameState, layerSta
if (this.declutterTree_) { if (this.declutterTree_) {
this.declutterTree_.clear(); this.declutterTree_.clear();
} }
const layer = /** @type {ol.layer.Vector} */ (this.getLayer()); const layer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
let drawOffsetX = 0; let drawOffsetX = 0;
let drawOffsetY = 0; let drawOffsetY = 0;
let replayContext; let replayContext;
@@ -252,7 +252,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
} else { } else {
const resolution = frameState.viewState.resolution; const resolution = frameState.viewState.resolution;
const rotation = frameState.viewState.rotation; const rotation = frameState.viewState.rotation;
const layer = /** @type {ol.layer.Vector} */ (this.getLayer()); const layer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
/** @type {!Object.<string, boolean>} */ /** @type {!Object.<string, boolean>} */
const features = {}; const features = {};
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {}, const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
@@ -297,7 +297,7 @@ CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
* @inheritDoc * @inheritDoc
*/ */
CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState) { CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState) {
const vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer()); const vectorLayer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
const vectorSource = vectorLayer.getSource(); const vectorSource = vectorLayer.getSource();
const animating = frameState.viewHints[ViewHint.ANIMATING]; const animating = frameState.viewHints[ViewHint.ANIMATING];
+4 -4
View File
@@ -51,7 +51,7 @@ const VECTOR_REPLAYS = {
/** /**
* @constructor * @constructor
* @extends {ol.renderer.canvas.TileLayer} * @extends {ol.renderer.canvas.TileLayer}
* @param {ol.layer.VectorTile} layer VectorTile layer. * @param {module:ol/layer/VectorTile~VectorTile} layer VectorTile layer.
* @api * @api
*/ */
const CanvasVectorTileLayerRenderer = function(layer) { const CanvasVectorTileLayerRenderer = function(layer) {
@@ -100,7 +100,7 @@ inherits(CanvasVectorTileLayerRenderer, CanvasTileLayerRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
CanvasVectorTileLayerRenderer['handles'] = function(type, layer) { CanvasVectorTileLayerRenderer['handles'] = function(type, layer) {
@@ -111,11 +111,11 @@ CanvasVectorTileLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.canvas.VectorTileLayer} The layer renderer. * @return {ol.renderer.canvas.VectorTileLayer} The layer renderer.
*/ */
CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) { CanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new CanvasVectorTileLayerRenderer(/** @type {ol.layer.VectorTile} */ (layer)); return new CanvasVectorTileLayerRenderer(/** @type {module:ol/layer/VectorTile~VectorTile} */ (layer));
}; };
+5 -5
View File
@@ -28,7 +28,7 @@ import {createTexture} from '../../webgl/Context.js';
* @constructor * @constructor
* @extends {ol.renderer.webgl.Layer} * @extends {ol.renderer.webgl.Layer}
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer. * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
* @param {ol.layer.Image} imageLayer Tile layer. * @param {module:ol/layer/Image~ImageLayer} imageLayer Tile layer.
* @api * @api
*/ */
const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) { const WebGLImageLayerRenderer = function(mapRenderer, imageLayer) {
@@ -62,7 +62,7 @@ inherits(WebGLImageLayerRenderer, WebGLLayerRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
WebGLImageLayerRenderer['handles'] = function(type, layer) { WebGLImageLayerRenderer['handles'] = function(type, layer) {
@@ -73,13 +73,13 @@ WebGLImageLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.webgl.ImageLayer} The layer renderer. * @return {ol.renderer.webgl.ImageLayer} The layer renderer.
*/ */
WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) { WebGLImageLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLImageLayerRenderer( return new WebGLImageLayerRenderer(
/** @type {ol.renderer.webgl.Map} */ (mapRenderer), /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
/** @type {ol.layer.Image} */ (layer) /** @type {module:ol/layer/Image~ImageLayer} */ (layer)
); );
}; };
@@ -140,7 +140,7 @@ WebGLImageLayerRenderer.prototype.prepareFrame = function(frameState, layerState
let image = this.image_; let image = this.image_;
let texture = this.texture; let texture = this.texture;
const imageLayer = /** @type {ol.layer.Image} */ (this.getLayer()); const imageLayer = /** @type {module:ol/layer/Image~ImageLayer} */ (this.getLayer());
const imageSource = imageLayer.getSource(); const imageSource = imageLayer.getSource();
const hints = frameState.viewHints; const hints = frameState.viewHints;
+2 -2
View File
@@ -20,7 +20,7 @@ import {createEmptyTexture} from '../../webgl/Context.js';
* @abstract * @abstract
* @extends {ol.renderer.Layer} * @extends {ol.renderer.Layer}
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer. * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
* @param {ol.layer.Layer} layer Layer. * @param {module:ol/layer/Layer~Layer} layer Layer.
*/ */
const WebGLLayerRenderer = function(mapRenderer, layer) { const WebGLLayerRenderer = function(mapRenderer, layer) {
@@ -255,7 +255,7 @@ WebGLLayerRenderer.prototype.prepareFrame = function(frameState, layerState, con
* @abstract * @abstract
* @param {module:ol~Pixel} pixel Pixel. * @param {module:ol~Pixel} pixel Pixel.
* @param {module:ol/PluggableMap~FrameState} frameState FrameState. * @param {module:ol/PluggableMap~FrameState} frameState FrameState.
* @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer * @param {function(this: S, module:ol/layer/Layer~Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
* callback. * callback.
* @param {S} thisArg Value to use as `this` when executing `callback`. * @param {S} thisArg Value to use as `this` when executing `callback`.
* @return {T|undefined} Callback result. * @return {T|undefined} Callback result.
+5 -5
View File
@@ -30,7 +30,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
* @constructor * @constructor
* @extends {ol.renderer.webgl.Layer} * @extends {ol.renderer.webgl.Layer}
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer. * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
* @param {ol.layer.Tile} tileLayer Tile layer. * @param {module:ol/layer/Tile~TileLayer} tileLayer Tile layer.
* @api * @api
*/ */
const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) { const WebGLTileLayerRenderer = function(mapRenderer, tileLayer) {
@@ -98,7 +98,7 @@ inherits(WebGLTileLayerRenderer, WebGLLayerRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
WebGLTileLayerRenderer['handles'] = function(type, layer) { WebGLTileLayerRenderer['handles'] = function(type, layer) {
@@ -109,13 +109,13 @@ WebGLTileLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.webgl.TileLayer} The layer renderer. * @return {ol.renderer.webgl.TileLayer} The layer renderer.
*/ */
WebGLTileLayerRenderer['create'] = function(mapRenderer, layer) { WebGLTileLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLTileLayerRenderer( return new WebGLTileLayerRenderer(
/** @type {ol.renderer.webgl.Map} */ (mapRenderer), /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
/** @type {ol.layer.Tile} */ (layer) /** @type {module:ol/layer/Tile~TileLayer} */ (layer)
); );
}; };
@@ -178,7 +178,7 @@ WebGLTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState,
const viewState = frameState.viewState; const viewState = frameState.viewState;
const projection = viewState.projection; const projection = viewState.projection;
const tileLayer = /** @type {ol.layer.Tile} */ (this.getLayer()); const tileLayer = /** @type {module:ol/layer/Tile~TileLayer} */ (this.getLayer());
const tileSource = tileLayer.getSource(); const tileSource = tileLayer.getSource();
const tileGrid = tileSource.getTileGridForProjection(projection); const tileGrid = tileSource.getTileGridForProjection(projection);
const z = tileGrid.getZForResolution(viewState.resolution); const z = tileGrid.getZForResolution(viewState.resolution);
+5 -5
View File
@@ -15,7 +15,7 @@ import {apply as applyTransform} from '../../transform.js';
* @constructor * @constructor
* @extends {ol.renderer.webgl.Layer} * @extends {ol.renderer.webgl.Layer}
* @param {ol.renderer.webgl.Map} mapRenderer Map renderer. * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
* @param {ol.layer.Vector} vectorLayer Vector layer. * @param {module:ol/layer/Vector~VectorLayer} vectorLayer Vector layer.
* @api * @api
*/ */
const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) { const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
@@ -73,7 +73,7 @@ inherits(WebGLVectorLayerRenderer, WebGLLayerRenderer);
/** /**
* Determine if this renderer handles the provided layer. * Determine if this renderer handles the provided layer.
* @param {ol.renderer.Type} type The renderer type. * @param {ol.renderer.Type} type The renderer type.
* @param {ol.layer.Layer} layer The candidate layer. * @param {module:ol/layer/Layer~Layer} layer The candidate layer.
* @return {boolean} The renderer can render the layer. * @return {boolean} The renderer can render the layer.
*/ */
WebGLVectorLayerRenderer['handles'] = function(type, layer) { WebGLVectorLayerRenderer['handles'] = function(type, layer) {
@@ -84,13 +84,13 @@ WebGLVectorLayerRenderer['handles'] = function(type, layer) {
/** /**
* Create a layer renderer. * Create a layer renderer.
* @param {ol.renderer.Map} mapRenderer The map renderer. * @param {ol.renderer.Map} mapRenderer The map renderer.
* @param {ol.layer.Layer} layer The layer to be rendererd. * @param {module:ol/layer/Layer~Layer} layer The layer to be rendererd.
* @return {ol.renderer.webgl.VectorLayer} The layer renderer. * @return {ol.renderer.webgl.VectorLayer} The layer renderer.
*/ */
WebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) { WebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) {
return new WebGLVectorLayerRenderer( return new WebGLVectorLayerRenderer(
/** @type {ol.renderer.webgl.Map} */ (mapRenderer), /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
/** @type {ol.layer.Vector} */ (layer) /** @type {module:ol/layer/Vector~VectorLayer} */ (layer)
); );
}; };
@@ -212,7 +212,7 @@ WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function(event) {
* @inheritDoc * @inheritDoc
*/ */
WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState, context) { WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerState, context) {
const vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer()); const vectorLayer = /** @type {module:ol/layer/Vector~VectorLayer} */ (this.getLayer());
const vectorSource = vectorLayer.getSource(); const vectorSource = vectorLayer.getSource();
const animating = frameState.viewHints[ViewHint.ANIMATING]; const animating = frameState.viewHints[ViewHint.ANIMATING];
+1 -1
View File
@@ -12,7 +12,7 @@ import SourceState from '../source/State.js';
* @classdesc * @classdesc
* Abstract base class; normally only used for creating subclasses and not * Abstract base class; normally only used for creating subclasses and not
* instantiated in apps. * instantiated in apps.
* Base class for {@link ol.layer.Layer} sources. * Base class for {@link module:ol/layer/Layer~Layer} sources.
* *
* A generic `change` event is triggered when the state of the source changes. * A generic `change` event is triggered when the state of the source changes.
* *
+3 -3
View File
@@ -79,7 +79,7 @@ const VectorSource = function(opt_options) {
/** /**
* @private * @private
* @type {ol.format.Feature|undefined} * @type {module:ol/format/Feature~FeatureFormat|undefined}
*/ */
this.format_ = options.format; this.format_ = options.format;
@@ -100,7 +100,7 @@ const VectorSource = function(opt_options) {
} else if (this.url_ !== undefined) { } else if (this.url_ !== undefined) {
assert(this.format_, 7); // `format` must be set when `url` is set assert(this.format_, 7); // `format` must be set when `url` is set
// create a XHR feature loader for "url" and "format" // create a XHR feature loader for "url" and "format"
this.loader_ = xhr(this.url_, /** @type {ol.format.Feature} */ (this.format_)); this.loader_ = xhr(this.url_, /** @type {module:ol/format/Feature~FeatureFormat} */ (this.format_));
} }
/** /**
@@ -656,7 +656,7 @@ VectorSource.prototype.getFeatureById = function(id) {
/** /**
* Get the format associated with this source. * Get the format associated with this source.
* *
* @return {ol.format.Feature|undefined} The feature format. * @return {module:ol/format/Feature~FeatureFormat|undefined} The feature format.
* @api * @api
*/ */
VectorSource.prototype.getFormat = function() { VectorSource.prototype.getFormat = function() {
+3 -3
View File
@@ -13,7 +13,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
/** /**
* @classdesc * @classdesc
* Class for layer sources providing vector data divided into a tile grid, to be * Class for layer sources providing vector data divided into a tile grid, to be
* used with {@link ol.layer.VectorTile}. Although this source receives tiles * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles
* with vector features from the server, it is not meant for feature editing. * with vector features from the server, it is not meant for feature editing.
* Features are optimized for rendering, their geometries are clipped at or near * Features are optimized for rendering, their geometries are clipped at or near
* tile boundaries and simplified for a view resolution. See * tile boundaries and simplified for a view resolution. See
@@ -56,7 +56,7 @@ const VectorTileSource = function(options) {
/** /**
* @private * @private
* @type {ol.format.Feature} * @type {module:ol/format/Feature~FeatureFormat}
*/ */
this.format_ = options.format ? options.format : null; this.format_ = options.format ? options.format : null;
@@ -75,7 +75,7 @@ const VectorTileSource = function(options) {
/** /**
* @protected * @protected
* @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string, * @type {function(new: module:ol/VectorTile~VectorTile, module:ol/tilecoord~TileCoord, module:ol/TileState~TileState, string,
* ol.format.Feature, module:ol/Tile~LoadFunction)} * module:ol/format/Feature~FeatureFormat, module:ol/Tile~LoadFunction)}
*/ */
this.tileClass = options.tileClass ? options.tileClass : VectorTile; this.tileClass = options.tileClass ? options.tileClass : VectorTile;