From d8c0e6e69b19ef8955a1a741331acb49681f9eca Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Thu, 22 Mar 2018 11:33:46 +0100 Subject: [PATCH] Module type for ol.format.Feature --- src/ol/VectorImageTile.js | 4 ++-- src/ol/VectorTile.js | 6 +++--- src/ol/featureloader.js | 4 ++-- src/ol/format/Feature.js | 2 +- src/ol/format/JSONFeature.js | 2 +- src/ol/format/MVT.js | 2 +- src/ol/format/TextFeature.js | 2 +- src/ol/format/XMLFeature.js | 2 +- src/ol/interaction/DragAndDrop.js | 8 ++++---- src/ol/source/Vector.js | 6 +++--- src/ol/source/VectorTile.js | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/ol/VectorImageTile.js b/src/ol/VectorImageTile.js index 2fee0f23f2..f6c29498b3 100644 --- a/src/ol/VectorImageTile.js +++ b/src/ol/VectorImageTile.js @@ -26,7 +26,7 @@ import {loadFeaturesXhr} from './featureloader.js'; * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/TileState~TileState} state State. * @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/tilecoord~TileCoord} urlTileCoord Wrapped tile coordinate for source urls. * @param {module:ol/Tile~UrlFunction} tileUrlFunction Tile url function. @@ -36,7 +36,7 @@ import {loadFeaturesXhr} from './featureloader.js'; * @param {number} pixelRatio Pixel ratio. * @param {module:ol/proj/Projection~Projection} projection Projection. * @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. * @param {function(this: module:ol/source/VectorTile~VectorTile, module:ol/events/Event~Event)} handleTileChange * Function to call when a source tile's state changes. diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index eda9642ad7..0a8fdec58d 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -11,7 +11,7 @@ import TileState from './TileState.js'; * @param {module:ol/tilecoord~TileCoord} tileCoord Tile coordinate. * @param {module:ol/TileState~TileState} state State. * @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~Options=} opt_options Tile options. */ @@ -32,7 +32,7 @@ const VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt /** * @private - * @type {module:ol/format/Feature~Feature} + * @type {module:ol/format/Feature~FeatureFormat} */ this.format_ = format; @@ -108,7 +108,7 @@ VectorTile.prototype.getExtent = function() { /** * 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 */ VectorTile.prototype.getFormat = function() { diff --git a/src/ol/featureloader.js b/src/ol/featureloader.js index 0e8742c80c..b4b003d30a 100644 --- a/src/ol/featureloader.js +++ b/src/ol/featureloader.js @@ -38,7 +38,7 @@ import FormatType from './format/FormatType.js'; /** * @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/proj/Projection~Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector~Vector, Array.)} success * Function called with the loaded features and optionally with the data * 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 * vector source. * @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. * @api */ diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index f58a68f3f1..13012fb597 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -52,7 +52,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten * Abstract base class; normally only used for creating subclasses and not * instantiated in apps. * 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 * file formats. See the documentation for each format for more details. * diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index 27c7c8d682..6334e33584 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js'; * * @constructor * @abstract - * @extends {ol.format.Feature} + * @extends {module:ol/format/Feature~FeatureFormat} */ const JSONFeature = function() { FeatureFormat.call(this); diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index a66cc9cc93..7172d9a77d 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -43,7 +43,7 @@ import RenderFeature from '../render/Feature.js'; * Feature format for reading data in the Mapbox MVT format. * * @constructor - * @extends {ol.format.Feature} + * @extends {module:ol/format/Feature~FeatureFormat} * @param {module:ol/format/MVT~Options=} opt_options Options. * @api */ diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index dbd144a270..3f7263dfaf 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -13,7 +13,7 @@ import FormatType from '../format/FormatType.js'; * * @constructor * @abstract - * @extends {ol.format.Feature} + * @extends {module:ol/format/Feature~FeatureFormat} */ const TextFeature = function() { FeatureFormat.call(this); diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index cbea15bf31..802e6f4aa0 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -15,7 +15,7 @@ import {isDocument, isNode, parse} from '../xml.js'; * * @constructor * @abstract - * @extends {ol.format.Feature} + * @extends {module:ol/format/Feature~FeatureFormat} */ const XMLFeature = function() { diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index 8929b954db..e5b42c77b1 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -14,7 +14,7 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {Array.} [formatConstructors] Format constructors. + * @property {Array.} [formatConstructors] Format constructors. * @property {ol.source.Vector} [source] Optional vector source where features will be added. If a source is provided * all existing features will be removed and new features will be added when * they are dropped on the target. If you want to add features to a vector @@ -100,7 +100,7 @@ const DragAndDrop = function(opt_options) { /** * @private - * @type {Array.} + * @type {Array.} */ this.formatConstructors_ = options.formatConstructors ? options.formatConstructors : []; @@ -183,7 +183,7 @@ DragAndDrop.prototype.handleResult_ = function(file, event) { */ const formatConstructor = formatConstructors[i]; /** - * @type {ol.format.Feature} + * @type {module:ol/format/Feature~FeatureFormat} */ const format = new formatConstructor(); 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 {module:ol/format/Feature~ReadOptions} options Read options. * @private diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index ddb9b51ce5..41eed5fee8 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -79,7 +79,7 @@ const VectorSource = function(opt_options) { /** * @private - * @type {ol.format.Feature|undefined} + * @type {module:ol/format/Feature~FeatureFormat|undefined} */ this.format_ = options.format; @@ -100,7 +100,7 @@ const VectorSource = function(opt_options) { } else if (this.url_ !== undefined) { assert(this.format_, 7); // `format` must be set when `url` is set // 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. * - * @return {ol.format.Feature|undefined} The feature format. + * @return {module:ol/format/Feature~FeatureFormat|undefined} The feature format. * @api */ VectorSource.prototype.getFormat = function() { diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index ebccee5377..cadbf4f20f 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -56,7 +56,7 @@ const VectorTileSource = function(options) { /** * @private - * @type {ol.format.Feature} + * @type {module:ol/format/Feature~FeatureFormat} */ this.format_ = options.format ? options.format : null; @@ -75,7 +75,7 @@ const VectorTileSource = function(options) { /** * @protected * @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;