Fix some types

This commit is contained in:
ahocevar
2018-04-27 00:26:03 +02:00
parent ce84c3bf57
commit 59d904e509
25 changed files with 103 additions and 102 deletions

View File

@@ -33,7 +33,7 @@ import RBush from '../structs/RBush.js';
/**
* @classdesc
* Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this
* Events emitted by {@link module:ol/source/VectorSource} instances are instances of this
* type.
*
* @constructor
@@ -65,7 +65,7 @@ inherits(VectorSourceEvent, Event);
* and the collection will stay in sync.
* @property {module:ol/format/Feature} [format] The feature format used by the XHR
* feature loader when `url` is set. Required if `url` is set, otherwise ignored.
* @property {module:ol/Feature~FeatureLoader} [loader]
* @property {module:ol/featureloader~FeatureLoader} [loader]
* The loader function used to load features, from a remote source for example.
* If this is not set and `url` is set, the source will create and use an XHR
* feature loader.
@@ -73,7 +73,7 @@ inherits(VectorSourceEvent, Event);
* Example:
*
* ```js
* var vectorSource = new module:ol/source/Vector~VectorSource({
* var vectorSource = new module:ol/source/VectorSource({
* format: new ol.format.GeoJSON(),
* loader: function(extent, resolution, projection) {
* var proj = projection.getCode();
@@ -107,11 +107,11 @@ inherits(VectorSourceEvent, Event);
* @property {module:ol/source/Vector~LoadingStrategy} [strategy] The loading strategy to use.
* By default an {@link ol.loadingstrategy.all}
* strategy is used, a one-off strategy which loads all features at once.
* @property {string|module:ol/Feature~FeatureUrlFunction} [url]
* @property {string|module:ol/featureloader~FeatureUrlfunction} [url]
* Setting this option instructs the source to load features using an XHR loader
* (see {@link ol.featureloader.xhr}). Use a `string` and an
* {@link ol.loadingstrategy.all} for a one-off download of all features from
* the given URL. Use a {@link module:ol/Feature~FeatureUrlFunction} to generate the url with
* the given URL. Use a {@link module:ol/featureloader~FeatureUrlfunction} to generate the url with
* other loading strategies.
* Requires `format` to be set as well.
* When default XHR feature loader is provided, the features will
@@ -128,15 +128,15 @@ inherits(VectorSourceEvent, Event);
* `false` may improve performance.
*
* Note that
* {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},
* {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and
* {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is
* set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop
* {@link module:ol/source/VectorSource#getFeaturesInExtent},
* {@link module:ol/source/VectorSource#getClosestFeatureToCoordinate} and
* {@link module:ol/source/VectorSource#getExtent} cannot be used when `useSpatialIndex` is
* set to `false`, and {@link module:ol/source/VectorSource#forEachFeatureInExtent} will loop
* through all features.
*
* When set to `false`, the features will be maintained in an
* {@link module:ol/Collection}, which can be retrieved through
* {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.
* {@link module:ol/source/VectorSource#getFeaturesCollection}.
* @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the
* -180° and 180° meridians to work properly, this should be set to `false`. The
* resulting geometry coordinates will then exceed the world bounds.
@@ -275,7 +275,7 @@ inherits(VectorSource, Source);
/**
* Add a single feature to the source. If you want to add a batch of features
* at once, call {@link module:ol/source/Vector~VectorSource#addFeatures source.addFeatures()}
* at once, call {@link module:ol/source/VectorSource#addFeatures source.addFeatures()}
* instead. A feature will not be added to the source if feature with
* the same id is already there. The reason for this behavior is to avoid
* feature duplication when using bbox or tile loading strategies.
@@ -545,11 +545,11 @@ VectorSource.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, c
* value, iteration will stop and the function will return the same value.
*
* If you are interested in features whose geometry intersects an extent, call
* the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent
* the {@link module:ol/source/VectorSource#forEachFeatureIntersectingExtent
* source.forEachFeatureIntersectingExtent()} method instead.
*
* When `useSpatialIndex` is set to false, this method will loop through all
* features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature}.
* features, equivalent to {@link module:ol/source/VectorSource#forEachFeature}.
*
* @param {module:ol/extent~Extent} extent Extent.
* @param {function(module:ol/Feature): T} callback Called with each feature
@@ -573,7 +573,7 @@ VectorSource.prototype.forEachFeatureInExtent = function(extent, callback) {
* value, iteration will stop and the function will return the same value.
*
* If you only want to test for bounding box intersection, call the
* {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent
* {@link module:ol/source/VectorSource#forEachFeatureInExtent
* source.forEachFeatureInExtent()} method instead.
*
* @param {module:ol/extent~Extent} extent Extent.
@@ -910,7 +910,7 @@ VectorSource.prototype.removeLoadedExtent = function(extent) {
/**
* Remove a single feature from the source. If you want to remove all features
* at once, use the {@link module:ol/source/Vector~VectorSource#clear source.clear()} method
* at once, use the {@link module:ol/source/VectorSource#clear source.clear()} method
* instead.
* @param {module:ol/Feature} feature Feature to remove.
* @api