Module type for ol/Feature

This commit is contained in:
Tim Schaub
2018-03-11 23:32:28 -06:00
parent 5c9aa0ce93
commit cf80733e41
56 changed files with 333 additions and 333 deletions

View File

@@ -26,7 +26,7 @@ import RenderFeature from '../render/Feature.js';
* @typedef {Object} Options
* @property {undefined|function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,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
* {@link module:ol/Feature~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
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
* @param {ol.ext.PBF} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {ol.Feature|ol.render.Feature} Feature.
* @return {module:ol/Feature~Feature|ol.render.Feature} Feature.
*/
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
const type = rawFeature.type;
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
const pbfLayers = pbf.readFields(layersPBFReader, {});
/** @type {Array.<ol.Feature|ol.render.Feature>} */
/** @type {Array.<module:ol/Feature~Feature|ol.render.Feature>} */
const features = [];
for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) {