Module type for ol.source.Vector

This commit is contained in:
Frederic Junod
2018-04-04 12:03:33 +02:00
parent e283193ff4
commit 3dbabb734b
7 changed files with 24 additions and 24 deletions

View File

@@ -32,7 +32,7 @@ import VectorSource from '../source/Vector.js';
* See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
* calculation point for polygons.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {ol.source.Vector} source Source.
* @property {module:ol/source/Vector~VectorSource} source Source.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
*/
@@ -45,7 +45,7 @@ import VectorSource from '../source/Vector.js';
*
* @constructor
* @param {module:ol/source/Cluster~Options=} options Cluster options.
* @extends {ol.source.Vector}
* @extends {module:ol/source/Vector~VectorSource}
* @api
*/
const Cluster = function(options) {
@@ -87,7 +87,7 @@ const Cluster = function(options) {
};
/**
* @type {ol.source.Vector}
* @type {module:ol/source/Vector~VectorSource}
* @protected
*/
this.source = options.source;
@@ -110,7 +110,7 @@ Cluster.prototype.getDistance = function() {
/**
* Get a reference to the wrapped source.
* @return {ol.source.Vector} Source.
* @return {module:ol/source/Vector~VectorSource} Source.
* @api
*/
Cluster.prototype.getSource = function() {

View File

@@ -24,7 +24,7 @@ import RBush from '../structs/RBush.js';
/**
* @classdesc
* Events emitted by {@link ol.source.Vector} instances are instances of this
* Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this
* type.
*
* @constructor
@@ -64,7 +64,7 @@ inherits(VectorSourceEvent, Event);
* Example:
*
* ```js
* var vectorSource = new ol.source.Vector({
* var vectorSource = new module:ol/source/Vector~VectorSource({
* format: new ol.format.GeoJSON(),
* loader: function(extent, resolution, projection) {
* var proj = projection.getCode();
@@ -119,15 +119,15 @@ inherits(VectorSourceEvent, Event);
* `false` may improve performance.
*
* Note that
* {@link ol.source.Vector#getFeaturesInExtent},
* {@link ol.source.Vector#getClosestFeatureToCoordinate} and
* {@link ol.source.Vector#getExtent} cannot be used when `useSpatialIndex` is
* set to `false`, and {@link ol.source.Vector#forEachFeatureInExtent} will loop
* {@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
* through all features.
*
* When set to `false`, the features will be maintained in an
* {@link ol.Collection}, which can be retrieved through
* {@link ol.source.Vector#getFeaturesCollection}.
* {@link module:ol/source/Vector~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.
@@ -266,7 +266,7 @@ inherits(VectorSource, Source);
/**
* Add a single feature to the source. If you want to add a batch of features
* at once, call {@link ol.source.Vector#addFeatures source.addFeatures()}
* at once, call {@link module:ol/source/Vector~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.
@@ -535,11 +535,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 ol.source.Vector#forEachFeatureIntersectingExtent
* the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent
* source.forEachFeatureIntersectingExtent()} method instead.
*
* When `useSpatialIndex` is set to false, this method will loop through all
* features, equivalent to {@link ol.source.Vector#forEachFeature}.
* features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature}.
*
* @param {module:ol/extent~Extent} extent Extent.
* @param {function(module:ol/Feature~Feature): T} callback Called with each feature
@@ -563,7 +563,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 ol.source.Vector#forEachFeatureInExtent
* {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent
* source.forEachFeatureInExtent()} method instead.
*
* @param {module:ol/extent~Extent} extent Extent.
@@ -883,7 +883,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 ol.source.Vector#clear source.clear()} method
* at once, use the {@link module:ol/source/Vector~VectorSource#clear source.clear()} method
* instead.
* @param {module:ol/Feature~Feature} feature Feature to remove.
* @api

View File

@@ -61,7 +61,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* with vector features from the server, it is not meant for feature editing.
* Features are optimized for rendering, their geometries are clipped at or near
* tile boundaries and simplified for a view resolution. See
* {@link ol.source.Vector} for vector sources that are suitable for feature
* {@link module:ol/source/Vector~VectorSource} for vector sources that are suitable for feature
* editing.
*
* @constructor