diff --git a/externs/olx.js b/externs/olx.js index ca39637278..8501328d66 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,56 +5,6 @@ let olx; -/** - * @typedef {{featureClass: (function((ol.geom.Geometry|Object.)=)| - * function(ol.geom.GeometryType,Array., - * (Array.|Array.>),Object.)| - * undefined), - * geometryName: (string|undefined), - * layers: (Array.|undefined), - * layerName: (string|undefined)}} - */ -olx.format.MVTOptions; - - -/** - * Class for features returned by {@link ol.format.MVT#readFeatures}. Set to - * {@link ol.Feature} to get full editing and geometry support at the cost of - * decreased rendering performance. The default is {@link ol.render.Feature}, - * which is optimized for rendering and hit detection. - * @type {undefined|function((ol.geom.Geometry|Object.)=)| - * function(ol.geom.GeometryType,Array., - * (Array.|Array.>),Object.,number)} - * @api - */ -olx.format.MVTOptions.prototype.featureClass; - - -/** - * Geometry name to use when creating features. Default is 'geometry'. - * @type {string|undefined} - * @api - */ -olx.format.MVTOptions.prototype.geometryName; - - -/** - * Name of the feature attribute that holds the layer name. Default is 'layer'. - * @type {string|undefined} - * @api - */ -olx.format.MVTOptions.prototype.layerName; - - -/** - * Layers to read features from. If not provided, features will be read from all - * layers. - * @type {Array.|undefined} - * @api - */ -olx.format.MVTOptions.prototype.layers; - - /** * @typedef {{factor: (number|undefined), * geometryLayout: (ol.geom.GeometryLayout|undefined)}} diff --git a/externs/xol.js b/externs/xol.js index d1441918fc..b2a97786bf 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,19 +1,4 @@ -/** - * @typedef {Object} format_MVTOptions - * @property {undefined|function((ol.geom.Geometry|Object.)=)| function(ol.geom.GeometryType,Array., - (Array.|Array.>),Object.,number)} - featureClass Class for features returned by {@link ol.format.MVT#readFeatures}. Set to - * {@link ol.Feature} to get full editing and geometry support at the cost of - * decreased rendering performance. The default is {@link ol.render.Feature}, - * which is optimized for rendering and hit detection. - * @property {string|undefined} geometryName Geometry name to use when creating features. Default is 'geometry'. - * @property {string|undefined} layerName Name of the feature attribute that holds the layer name. Default is 'layer'. - * @property {Array.|undefined} layers Layers to read features from. If not provided, features will be read from all - * layers. - */ - - /** * @typedef {Object} format_PolylineOptions * @property {number|undefined} factor The factor by which the coordinates values will be scaled. diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 3e42fc0738..db8ed9854c 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -21,13 +21,30 @@ import Projection from '../proj/Projection.js'; import Units from '../proj/Units.js'; import RenderFeature from '../render/Feature.js'; + +/** + * @typedef {Object} Options + * @property {undefined|function((ol.geom.Geometry|Object.)=)|function(ol.geom.GeometryType,Array.,(Array.|Array.>),Object.,number)} featureClass + * Class for features returned by {@link ol.format.MVT#readFeatures}. Set to + * {@link ol.Feature} to get full editing and geometry support at the cost of + * decreased rendering performance. The default is {@link ol.render.Feature}, + * which is optimized for rendering and hit detection. + * @property {string|undefined} geometryName Geometry name to use when creating + * features. Default is `'geometry'`. + * @property {string|undefined} layerName Name of the feature attribute that + * holds the layer name. Default is `'layer'`. + * @property {Array.|undefined} layers Layers to read features from. If not + * provided, features will be read from all layers. + */ + + /** * @classdesc * Feature format for reading data in the Mapbox MVT format. * * @constructor * @extends {ol.format.Feature} - * @param {olx.format.MVTOptions=} opt_options Options. + * @param {module:ol/format/MVT~Options=} opt_options Options. * @api */ const MVT = function(opt_options) {