diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 4b0ad55729..0f388a10b2 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -58,12 +58,14 @@ GEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry; * @classdesc * Feature format for reading and writing data in the EsriJSON format. * - * @constructor * @extends {module:ol/format/JSONFeature} - * @param {module:ol/format/EsriJSON~Options=} opt_options Options. * @api */ class EsriJSON { + + /** + * @param {module:ol/format/EsriJSON~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index ce9c8a7e29..f5b49cdc9f 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -56,7 +56,6 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial * file formats. See the documentation for each format for more details. * - * @constructor * @abstract * @api */ @@ -64,26 +63,26 @@ class FeatureFormat { constructor() { /** - * @protected - * @type {module:ol/proj/Projection} - */ + * @protected + * @type {module:ol/proj/Projection} + */ this.dataProjection = null; /** - * @protected - * @type {module:ol/proj/Projection} - */ + * @protected + * @type {module:ol/proj/Projection} + */ this.defaultFeatureProjection = null; } /** - * Adds the data projection to the read options. - * @param {Document|Node|Object|string} source Source. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Options. - * @return {module:ol/format/Feature~ReadOptions|undefined} Options. - * @protected - */ + * Adds the data projection to the read options. + * @param {Document|Node|Object|string} source Source. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Options. + * @return {module:ol/format/Feature~ReadOptions|undefined} Options. + * @protected + */ getReadOptions(source, opt_options) { let options; if (opt_options) { @@ -97,14 +96,14 @@ class FeatureFormat { } /** - * Sets the `dataProjection` on the options, if no `dataProjection` - * is set. - * @param {module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions|undefined} options - * Options. - * @protected - * @return {module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions|undefined} - * Updated options. - */ + * Sets the `dataProjection` on the options, if no `dataProjection` + * is set. + * @param {module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions|undefined} options + * Options. + * @protected + * @return {module:ol/format/Feature~WriteOptions|module:ol/format/Feature~ReadOptions|undefined} + * Updated options. + */ adaptOptions(options) { return assign({ dataProjection: this.dataProjection, @@ -113,86 +112,86 @@ class FeatureFormat { } /** - * Get the extent from the source of the last {@link readFeatures} call. - * @return {module:ol/extent~Extent} Tile extent. - */ + * Get the extent from the source of the last {@link readFeatures} call. + * @return {module:ol/extent~Extent} Tile extent. + */ getLastExtent() { return null; } /** - * @abstract - * @return {module:ol/format/FormatType} Format. - */ + * @abstract + * @return {module:ol/format/FormatType} Format. + */ getType() {} /** - * Read a single feature from a source. - * - * @abstract - * @param {Document|Node|Object|string} source Source. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {module:ol/Feature} Feature. - */ + * Read a single feature from a source. + * + * @abstract + * @param {Document|Node|Object|string} source Source. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @return {module:ol/Feature} Feature. + */ readFeature(source, opt_options) {} /** - * Read all features from a source. - * - * @abstract - * @param {Document|Node|ArrayBuffer|Object|string} source Source. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Features. - */ + * Read all features from a source. + * + * @abstract + * @param {Document|Node|ArrayBuffer|Object|string} source Source. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @return {Array.} Features. + */ readFeatures(source, opt_options) {} /** - * Read a single geometry from a source. - * - * @abstract - * @param {Document|Node|Object|string} source Source. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {module:ol/geom/Geometry} Geometry. - */ + * Read a single geometry from a source. + * + * @abstract + * @param {Document|Node|Object|string} source Source. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @return {module:ol/geom/Geometry} Geometry. + */ readGeometry(source, opt_options) {} /** - * Read the projection from a source. - * - * @abstract - * @param {Document|Node|Object|string} source Source. - * @return {module:ol/proj/Projection} Projection. - */ + * Read the projection from a source. + * + * @abstract + * @param {Document|Node|Object|string} source Source. + * @return {module:ol/proj/Projection} Projection. + */ readProjection(source) {} /** - * Encode a feature in this format. - * - * @abstract - * @param {module:ol/Feature} feature Feature. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {string} Result. - */ + * Encode a feature in this format. + * + * @abstract + * @param {module:ol/Feature} feature Feature. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {string} Result. + */ writeFeature(feature, opt_options) {} /** - * Encode an array of features in this format. - * - * @abstract - * @param {Array.} features Features. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {string} Result. - */ + * Encode an array of features in this format. + * + * @abstract + * @param {Array.} features Features. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {string} Result. + */ writeFeatures(features, opt_options) {} /** - * Write a single geometry in this format. - * - * @abstract - * @param {module:ol/geom/Geometry} geometry Geometry. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {string} Result. - */ + * Write a single geometry in this format. + * + * @abstract + * @param {module:ol/geom/Geometry} geometry Geometry. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {string} Result. + */ writeGeometry(geometry, opt_options) {} } diff --git a/src/ol/format/GML2.js b/src/ol/format/GML2.js index 7fc311bd06..31d878c000 100644 --- a/src/ol/format/GML2.js +++ b/src/ol/format/GML2.js @@ -37,12 +37,14 @@ const MULTIGEOMETRY_TO_MEMBER_NODENAME = { * Feature format for reading and writing data in the GML format, * version 2.1.2. * - * @constructor - * @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object. * @extends {module:ol/format/GMLBase} * @api */ class GML2 { + + /** + * @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object. + */ constructor(opt_options) { const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {}); diff --git a/src/ol/format/GML3.js b/src/ol/format/GML3.js index 25dd096c18..cd7090a5d0 100644 --- a/src/ol/format/GML3.js +++ b/src/ol/format/GML3.js @@ -48,13 +48,14 @@ const MULTIGEOMETRY_TO_MEMBER_NODENAME = { * version 3.1.1. * Currently only supports GML 3.1.1 Simple Features profile. * - * @constructor - * @param {module:ol/format/GMLBase~Options=} opt_options - * Optional configuration object. * @extends {module:ol/format/GMLBase} * @api */ class GML3 { + + /** + * @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object. + */ constructor(opt_options) { const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {}); diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index bb5c73c372..38267f92ea 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -83,13 +83,14 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/; * This class cannot be instantiated, it contains only base content that * is shared with versioned format classes GML2 and GML3. * - * @constructor * @abstract - * @param {module:ol/format/GMLBase~Options=} opt_options - * Optional configuration object. * @extends {module:ol/format/XMLFeature} */ class GMLBase { + + /** + * @param {module:ol/format/GMLBase~Options=} opt_options Optional configuration object. + */ constructor(opt_options) { const options = /** @type {module:ol/format/GMLBase~Options} */ (opt_options ? opt_options : {}); diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index f68a4b381f..5981678cba 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -103,12 +103,14 @@ const GPX_SERIALIZERS = makeStructureNS( * @classdesc * Feature format for reading and writing data in the GPX format. * - * @constructor * @extends {module:ol/format/XMLFeature} - * @param {module:ol/format/GPX~Options=} opt_options Options. * @api */ class GPX { + + /** + * @param {module:ol/format/GPX~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index f3392fdfdf..67a3de5d38 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -37,12 +37,14 @@ import {get as getProjection} from '../proj.js'; * @classdesc * Feature format for reading and writing data in the GeoJSON format. * - * @constructor * @extends {module:ol/format/JSONFeature} - * @param {module:ol/format/GeoJSON~Options=} opt_options Options. * @api */ class GeoJSON { + + /** + * @param {module:ol/format/GeoJSON~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/IGC.js b/src/ol/format/IGC.js index 5a23b38b14..8c21735640 100644 --- a/src/ol/format/IGC.js +++ b/src/ol/format/IGC.js @@ -61,12 +61,14 @@ const NEWLINE_RE = /\r\n|\r|\n/; * @classdesc * Feature format for `*.igc` flight recording files. * - * @constructor * @extends {module:ol/format/TextFeature} - * @param {module:ol/format/IGC~Options=} opt_options Options. * @api */ class IGC { + + /** + * @param {module:ol/format/IGC~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index 45c3039a31..682bdc87e5 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -11,7 +11,6 @@ import FormatType from '../format/FormatType.js'; * instantiated in apps. * Base class for JSON feature formats. * - * @constructor * @abstract * @extends {module:ol/format/Feature} */ @@ -21,121 +20,121 @@ class JSONFeature { } /** - * @inheritDoc - */ + * @inheritDoc + */ getType() { return FormatType.JSON; } /** - * @inheritDoc - */ + * @inheritDoc + */ readFeature(source, opt_options) { return this.readFeatureFromObject( getObject(source), this.getReadOptions(source, opt_options)); } /** - * @inheritDoc - */ + * @inheritDoc + */ readFeatures(source, opt_options) { return this.readFeaturesFromObject( getObject(source), this.getReadOptions(source, opt_options)); } /** - * @abstract - * @param {Object} object Object. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {module:ol/Feature} Feature. - */ + * @abstract + * @param {Object} object Object. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {module:ol/Feature} Feature. + */ readFeatureFromObject(object, opt_options) {} /** - * @abstract - * @param {Object} object Object. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {Array.} Features. - */ + * @abstract + * @param {Object} object Object. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {Array.} Features. + */ readFeaturesFromObject(object, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ readGeometry(source, opt_options) { return this.readGeometryFromObject( getObject(source), this.getReadOptions(source, opt_options)); } /** - * @abstract - * @param {Object} object Object. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {module:ol/geom/Geometry} Geometry. - */ + * @abstract + * @param {Object} object Object. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {module:ol/geom/Geometry} Geometry. + */ readGeometryFromObject(object, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ readProjection(source) { return this.readProjectionFromObject(getObject(source)); } /** - * @abstract - * @param {Object} object Object. - * @protected - * @return {module:ol/proj/Projection} Projection. - */ + * @abstract + * @param {Object} object Object. + * @protected + * @return {module:ol/proj/Projection} Projection. + */ readProjectionFromObject(object) {} /** - * @inheritDoc - */ + * @inheritDoc + */ writeFeature(feature, opt_options) { return JSON.stringify(this.writeFeatureObject(feature, opt_options)); } /** - * @abstract - * @param {module:ol/Feature} feature Feature. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {Object} Object. - */ + * @abstract + * @param {module:ol/Feature} feature Feature. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {Object} Object. + */ writeFeatureObject(feature, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ writeFeatures(features, opt_options) { return JSON.stringify(this.writeFeaturesObject(features, opt_options)); } /** - * @abstract - * @param {Array.} features Features. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {Object} Object. - */ + * @abstract + * @param {Array.} features Features. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {Object} Object. + */ writeFeaturesObject(features, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ writeGeometry(geometry, opt_options) { return JSON.stringify(this.writeGeometryObject(geometry, opt_options)); } /** - * @abstract - * @param {module:ol/geom/Geometry} geometry Geometry. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @return {Object} Object. - */ + * @abstract + * @param {module:ol/geom/Geometry} geometry Geometry. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @return {Object} Object. + */ writeGeometryObject(geometry, opt_options) {} } diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index ab2ef3203b..be5b75b5dd 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -391,12 +391,14 @@ function createStyleDefaults() { * Note that the KML format uses the URL() constructor. Older browsers such as IE * which do not support this will need a URL polyfill to be loaded before use. * - * @constructor * @extends {module:ol/format/XMLFeature} - * @param {module:ol/format/KML~Options=} opt_options Options. * @api */ class KML { + + /** + * @param {module:ol/format/KML~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 2e09508cbc..9c325c0ef3 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -42,12 +42,15 @@ import RenderFeature from '../render/Feature.js'; * @classdesc * Feature format for reading data in the Mapbox MVT format. * - * @constructor * @extends {module:ol/format/Feature} * @param {module:ol/format/MVT~Options=} opt_options Options. * @api */ class MVT { + + /** + * @param {module:ol/format/MVT~Options=} opt_options Options. + */ constructor(opt_options) { FeatureFormat.call(this); diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index f18bbf8f83..3d76a8e7c1 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -50,7 +50,6 @@ const PARSERS = makeStructureNS( * Feature format for reading data in the * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML). * - * @constructor * @extends {module:ol/format/XMLFeature} * @api */ diff --git a/src/ol/format/OWS.js b/src/ol/format/OWS.js index fecdf3ac90..dfcc9e2d34 100644 --- a/src/ol/format/OWS.js +++ b/src/ol/format/OWS.js @@ -28,7 +28,6 @@ const PARSERS = makeStructureNS( /** - * @constructor * @extends {module:ol/format/XML} */ class OWS { diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index d7f57cee60..5cdfbee7a9 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -27,12 +27,14 @@ import {get as getProjection} from '../proj.js'; * Feature format for reading and writing data in the Encoded * Polyline Algorithm Format. * - * @constructor * @extends {module:ol/format/TextFeature} - * @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object. * @api */ class Polyline { + + /** + * @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index 34b4d6bfd0..bf0561da42 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -11,7 +11,6 @@ import FormatType from '../format/FormatType.js'; * instantiated in apps. * Base class for text feature formats. * - * @constructor * @abstract * @extends {module:ol/format/Feature} */ @@ -21,122 +20,122 @@ class TextFeature { } /** - * @inheritDoc - */ + * @inheritDoc + */ getType() { return FormatType.TEXT; } /** - * @inheritDoc - */ + * @inheritDoc + */ readFeature(source, opt_options) { return this.readFeatureFromText(getText(source), this.adaptOptions(opt_options)); } /** - * @abstract - * @param {string} text Text. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {module:ol/Feature} Feature. - */ + * @abstract + * @param {string} text Text. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {module:ol/Feature} Feature. + */ readFeatureFromText(text, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ readFeatures(source, opt_options) { return this.readFeaturesFromText(getText(source), this.adaptOptions(opt_options)); } /** - * @abstract - * @param {string} text Text. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {Array.} Features. - */ + * @abstract + * @param {string} text Text. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {Array.} Features. + */ readFeaturesFromText(text, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ readGeometry(source, opt_options) { return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options)); } /** - * @abstract - * @param {string} text Text. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @protected - * @return {module:ol/geom/Geometry} Geometry. - */ + * @abstract + * @param {string} text Text. + * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. + * @protected + * @return {module:ol/geom/Geometry} Geometry. + */ readGeometryFromText(text, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ readProjection(source) { return this.readProjectionFromText(getText(source)); } /** - * @param {string} text Text. - * @protected - * @return {module:ol/proj/Projection} Projection. - */ + * @param {string} text Text. + * @protected + * @return {module:ol/proj/Projection} Projection. + */ readProjectionFromText(text) { return this.dataProjection; } /** - * @inheritDoc - */ + * @inheritDoc + */ writeFeature(feature, opt_options) { return this.writeFeatureText(feature, this.adaptOptions(opt_options)); } /** - * @abstract - * @param {module:ol/Feature} feature Features. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @protected - * @return {string} Text. - */ + * @abstract + * @param {module:ol/Feature} feature Features. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. + */ writeFeatureText(feature, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ writeFeatures(features, opt_options) { return this.writeFeaturesText(features, this.adaptOptions(opt_options)); } /** - * @abstract - * @param {Array.} features Features. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @protected - * @return {string} Text. - */ + * @abstract + * @param {Array.} features Features. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. + */ writeFeaturesText(features, opt_options) {} /** - * @inheritDoc - */ + * @inheritDoc + */ writeGeometry(geometry, opt_options) { return this.writeGeometryText(geometry, this.adaptOptions(opt_options)); } /** - * @abstract - * @param {module:ol/geom/Geometry} geometry Geometry. - * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. - * @protected - * @return {string} Text. - */ + * @abstract + * @param {module:ol/geom/Geometry} geometry Geometry. + * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. + * @protected + * @return {string} Text. + */ writeGeometryText(geometry, opt_options) {} } diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index 5ed2121b70..5c586c36f4 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -43,12 +43,14 @@ import {get as getProjection} from '../proj.js'; * @classdesc * Feature format for reading data in the TopoJSON format. * - * @constructor * @extends {module:ol/format/JSONFeature} - * @param {module:ol/format/TopoJSON~Options=} opt_options Options. * @api */ class TopoJSON { + + /** + * @param {module:ol/format/TopoJSON~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js index bd86b1f7a4..2fbcbc7911 100644 --- a/src/ol/format/WFS.js +++ b/src/ol/format/WFS.js @@ -201,12 +201,14 @@ const DEFAULT_VERSION = '1.1.0'; * as option if you want to read a WFS that contains GML2 (WFS 1.0.0). * Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format. * - * @constructor - * @param {module:ol/format/WFS~Options=} opt_options Optional configuration object. * @extends {module:ol/format/XMLFeature} * @api */ class WFS { + + /** + * @param {module:ol/format/WFS~Options=} opt_options Optional configuration object. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index a6fc544caa..4a73ae6da7 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -87,10 +87,12 @@ const TokenType = { /** * Class to tokenize a WKT string. - * @param {string} wkt WKT string. - * @constructor */ class Lexer { + + /** + * @param {string} wkt WKT string. + */ constructor(wkt) { /** @@ -218,10 +220,12 @@ class Lexer { /** * Class to parse the tokens from the WKT string. - * @param {module:ol/format/WKT~Lexer} lexer The lexer. - * @constructor */ class Parser { + + /** + * @param {module:ol/format/WKT~Lexer} lexer The lexer. + */ constructor(lexer) { /** @@ -590,12 +594,14 @@ class Parser { * Geometry format for reading and writing data in the `WellKnownText` (WKT) * format. * - * @constructor * @extends {module:ol/format/TextFeature} - * @param {module:ol/format/WKT~Options=} opt_options Options. * @api */ class WKT { + + /** + * @param {module:ol/format/WKT~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/WMSCapabilities.js b/src/ol/format/WMSCapabilities.js index ec24bce93c..5e49906fae 100644 --- a/src/ol/format/WMSCapabilities.js +++ b/src/ol/format/WMSCapabilities.js @@ -46,7 +46,6 @@ const CAPABILITY_PARSERS = makeStructureNS( * @classdesc * Format for reading WMS capabilities data * - * @constructor * @extends {module:ol/format/XML} * @api */ diff --git a/src/ol/format/WMSGetFeatureInfo.js b/src/ol/format/WMSGetFeatureInfo.js index 125cf7d2f7..e4aca1f103 100644 --- a/src/ol/format/WMSGetFeatureInfo.js +++ b/src/ol/format/WMSGetFeatureInfo.js @@ -34,12 +34,14 @@ const layerIdentifier = '_layer'; * Format for reading WMSGetFeatureInfo format. It uses * {@link module:ol/format/GML2~GML2} to read features. * - * @constructor * @extends {module:ol/format/XMLFeature} - * @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options. * @api */ class WMSGetFeatureInfo { + + /** + * @param {module:ol/format/WMSGetFeatureInfo~Options=} opt_options Options. + */ constructor(opt_options) { const options = opt_options ? opt_options : {}; diff --git a/src/ol/format/WMTSCapabilities.js b/src/ol/format/WMTSCapabilities.js index 4acffd40a9..a9b03e95f4 100644 --- a/src/ol/format/WMTSCapabilities.js +++ b/src/ol/format/WMTSCapabilities.js @@ -45,7 +45,6 @@ const PARSERS = makeStructureNS( * @classdesc * Format for reading WMTS capabilities data. * - * @constructor * @extends {module:ol/format/XML} * @api */ diff --git a/src/ol/format/XML.js b/src/ol/format/XML.js index 817aaeb4f1..d210640b32 100644 --- a/src/ol/format/XML.js +++ b/src/ol/format/XML.js @@ -7,15 +7,13 @@ import {isDocument, isNode, parse} from '../xml.js'; * @classdesc * Generic format for reading non-feature XML data * - * @constructor * @abstract - * @struct */ class XML { /** - * @param {Document|Node|string} source Source. - * @return {Object} The parsed result. - */ + * @param {Document|Node|string} source Source. + * @return {Object} The parsed result. + */ read(source) { if (isDocument(source)) { return this.readFromDocument(/** @type {Document} */ (source)); @@ -30,17 +28,17 @@ class XML { } /** - * @abstract - * @param {Document} doc Document. - * @return {Object} Object - */ + * @abstract + * @param {Document} doc Document. + * @return {Object} Object + */ readFromDocument(doc) {} /** - * @abstract - * @param {Node} node Node. - * @return {Object} Object - */ + * @abstract + * @param {Node} node Node. + * @return {Object} Object + */ readFromNode(node) {} } diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 5365257d39..8874ee7c20 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -13,7 +13,6 @@ import {isDocument, isNode, parse} from '../xml.js'; * instantiated in apps. * Base class for XML feature formats. * - * @constructor * @abstract * @extends {module:ol/format/Feature} */