Module type for ol.Collection
This commit is contained in:
@@ -39,7 +39,7 @@ import {listen, unlistenByKey} from '../events.js';
|
|||||||
*
|
*
|
||||||
* The main advantage of having this as a control rather than a simple separate
|
* The main advantage of having this as a control rather than a simple separate
|
||||||
* DOM element is that preventing propagation is handled for you. Controls
|
* DOM element is that preventing propagation is handled for you. Controls
|
||||||
* will also be objects in a `ol.Collection`, so you can use their methods.
|
* will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.
|
||||||
*
|
*
|
||||||
* You can also extend this base for your own control class. See
|
* You can also extend this base for your own control class. See
|
||||||
* examples/custom-controls for an example of how to do this.
|
* examples/custom-controls for an example of how to do this.
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const MIN_RATIO = 0.1;
|
|||||||
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
|
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
|
||||||
* @property {string|Element} [label='»'] Text label to use for the collapsed
|
* @property {string|Element} [label='»'] Text label to use for the collapsed
|
||||||
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
|
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
|
||||||
* @property {Array.<ol.layer.Layer>|ol.Collection.<ol.layer.Layer>} [layers]
|
* @property {Array.<ol.layer.Layer>|module:ol/Collection~Collection.<ol.layer.Layer>} [layers]
|
||||||
* Layers for the overview map. If not set, then all main map layers are used
|
* Layers for the overview map. If not set, then all main map layers are used
|
||||||
* instead.
|
* instead.
|
||||||
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
* @property {function(module:ol/MapEvent~MapEvent)} [render] Function called when the control
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const Property = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A {@link ol.Collection} of layers that are handled together.
|
* A {@link module:ol/Collection~Collection} of layers that are handled together.
|
||||||
*
|
*
|
||||||
* A generic `change` event is triggered when the group/Collection changes.
|
* A generic `change` event is triggered when the group/Collection changes.
|
||||||
*
|
*
|
||||||
@@ -149,22 +149,22 @@ LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
|
* Returns the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
|
||||||
* in this group.
|
* in this group.
|
||||||
* @return {!ol.Collection.<ol.layer.Base>} Collection of
|
* @return {!module:ol/Collection~Collection.<ol.layer.Base>} Collection of
|
||||||
* {@link ol.layer.Base layers} that are part of this group.
|
* {@link ol.layer.Base layers} that are part of this group.
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
LayerGroup.prototype.getLayers = function() {
|
LayerGroup.prototype.getLayers = function() {
|
||||||
return /** @type {!ol.Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
|
return /** @type {!module:ol/Collection~Collection.<ol.layer.Base>} */ (this.get(Property.LAYERS));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
|
* Set the {@link module:ol/Collection~Collection collection} of {@link ol.layer.Layer layers}
|
||||||
* in this group.
|
* in this group.
|
||||||
* @param {!ol.Collection.<ol.layer.Base>} layers Collection of
|
* @param {!module:ol/Collection~Collection.<ol.layer.Base>} layers Collection of
|
||||||
* {@link ol.layer.Base layers} that are part of this group.
|
* {@link ol.layer.Base layers} that are part of this group.
|
||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ const VectorSource = function(opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.Collection.<module:ol/Feature~Feature>}
|
* @type {module:ol/Collection~Collection.<module:ol/Feature~Feature>}
|
||||||
*/
|
*/
|
||||||
this.featuresCollection_ = null;
|
this.featuresCollection_ = null;
|
||||||
|
|
||||||
@@ -316,7 +316,7 @@ VectorSource.prototype.addFeaturesInternal = function(features) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {!ol.Collection.<module:ol/Feature~Feature>} collection Collection.
|
* @param {!module:ol/Collection~Collection.<module:ol/Feature~Feature>} collection Collection.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
VectorSource.prototype.bindFeaturesCollection_ = function(collection) {
|
||||||
@@ -509,8 +509,8 @@ VectorSource.prototype.forEachFeatureIntersectingExtent = function(extent, callb
|
|||||||
/**
|
/**
|
||||||
* Get the features collection associated with this source. Will be `null`
|
* Get the features collection associated with this source. Will be `null`
|
||||||
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
* unless the source was configured with `useSpatialIndex` set to `false`, or
|
||||||
* with an {@link ol.Collection} as `features`.
|
* with an {@link module:ol/Collection~Collection} as `features`.
|
||||||
* @return {ol.Collection.<module:ol/Feature~Feature>} The collection of features.
|
* @return {module:ol/Collection~Collection.<module:ol/Feature~Feature>} The collection of features.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
VectorSource.prototype.getFeaturesCollection = function() {
|
VectorSource.prototype.getFeaturesCollection = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user