Add @api stable annotations for ol.source.Vector

This commit is contained in:
Éric Lemoine
2014-08-18 18:17:21 +02:00
parent 68fc7e5251
commit 02dc7bcc9e
2 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -4639,7 +4639,7 @@ olx.source.TileWMSOptions.prototype.urls;
* logo: (string|olx.LogoOptions|undefined), * logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike, * projection: ol.proj.ProjectionLike,
* state: (ol.source.State|string|undefined)}} * state: (ol.source.State|string|undefined)}}
* @api * @api stable
*/ */
olx.source.VectorOptions; olx.source.VectorOptions;
+14 -14
View File
@@ -25,13 +25,13 @@ ol.source.VectorEventType = {
/** /**
* Triggered when a feature is added to the source. * Triggered when a feature is added to the source.
* @event ol.source.VectorEvent#addfeature * @event ol.source.VectorEvent#addfeature
* @api * @api stable
*/ */
ADDFEATURE: 'addfeature', ADDFEATURE: 'addfeature',
/** /**
* Triggered when a feature is removed from the source. * Triggered when a feature is removed from the source.
* @event ol.source.VectorEvent#removefeature * @event ol.source.VectorEvent#removefeature
* @api * @api stable
*/ */
REMOVEFEATURE: 'removefeature' REMOVEFEATURE: 'removefeature'
}; };
@@ -46,7 +46,7 @@ ol.source.VectorEventType = {
* @extends {ol.source.Source} * @extends {ol.source.Source}
* @fires ol.source.VectorEvent * @fires ol.source.VectorEvent
* @param {olx.source.VectorOptions=} opt_options Vector source options. * @param {olx.source.VectorOptions=} opt_options Vector source options.
* @api * @api stable
*/ */
ol.source.Vector = function(opt_options) { ol.source.Vector = function(opt_options) {
@@ -102,7 +102,7 @@ goog.inherits(ol.source.Vector, ol.source.Source);
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @api * @api stable
*/ */
ol.source.Vector.prototype.addFeature = function(feature) { ol.source.Vector.prototype.addFeature = function(feature) {
this.addFeatureInternal(feature); this.addFeatureInternal(feature);
@@ -148,7 +148,7 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) {
/** /**
* @param {Array.<ol.Feature>} features Features. * @param {Array.<ol.Feature>} features Features.
* @api * @api stable
*/ */
ol.source.Vector.prototype.addFeatures = function(features) { ol.source.Vector.prototype.addFeatures = function(features) {
this.addFeaturesInternal(features); this.addFeaturesInternal(features);
@@ -172,7 +172,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
/** /**
* Remove all features. * Remove all features.
* @api * @api stable
*/ */
ol.source.Vector.prototype.clear = function() { ol.source.Vector.prototype.clear = function() {
this.rBush_.forEach(this.removeFeatureInternal, this); this.rBush_.forEach(this.removeFeatureInternal, this);
@@ -190,7 +190,7 @@ ol.source.Vector.prototype.clear = function() {
* @param {T=} opt_this The object to use as `this` in `f`. * @param {T=} opt_this The object to use as `this` in `f`.
* @return {S|undefined} * @return {S|undefined}
* @template T,S * @template T,S
* @api * @api stable
*/ */
ol.source.Vector.prototype.forEachFeature = function(f, opt_this) { ol.source.Vector.prototype.forEachFeature = function(f, opt_this) {
return this.rBush_.forEach(f, opt_this); return this.rBush_.forEach(f, opt_this);
@@ -249,7 +249,7 @@ ol.source.Vector.prototype.forEachFeatureInExtentAtResolution =
/** /**
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @api * @api stable
*/ */
ol.source.Vector.prototype.getFeatures = function() { ol.source.Vector.prototype.getFeatures = function() {
var features = this.rBush_.getAll(); var features = this.rBush_.getAll();
@@ -264,7 +264,7 @@ ol.source.Vector.prototype.getFeatures = function() {
/** /**
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @return {Array.<ol.Feature>} Features. * @return {Array.<ol.Feature>} Features.
* @api * @api stable
*/ */
ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) { ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) {
var features = []; var features = [];
@@ -287,7 +287,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
/** /**
* @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} coordinate Coordinate.
* @return {ol.Feature} Closest feature. * @return {ol.Feature} Closest feature.
* @api * @api stable
*/ */
ol.source.Vector.prototype.getClosestFeatureToCoordinate = ol.source.Vector.prototype.getClosestFeatureToCoordinate =
function(coordinate) { function(coordinate) {
@@ -334,7 +334,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate =
/** /**
* Get the extent of the features currently in the source. * Get the extent of the features currently in the source.
* @return {ol.Extent} Extent. * @return {ol.Extent} Extent.
* @api * @api stable
*/ */
ol.source.Vector.prototype.getExtent = function() { ol.source.Vector.prototype.getExtent = function() {
return this.rBush_.getExtent(); return this.rBush_.getExtent();
@@ -348,7 +348,7 @@ ol.source.Vector.prototype.getExtent = function() {
* *
* @param {string|number} id Feature identifier. * @param {string|number} id Feature identifier.
* @return {ol.Feature} The feature (or `null` if not found). * @return {ol.Feature} The feature (or `null` if not found).
* @api * @api stable
*/ */
ol.source.Vector.prototype.getFeatureById = function(id) { ol.source.Vector.prototype.getFeatureById = function(id) {
var feature = this.idIndex_[id.toString()]; var feature = this.idIndex_[id.toString()];
@@ -426,7 +426,7 @@ ol.source.Vector.prototype.loadFeatures = goog.nullFunction;
/** /**
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @api * @api stable
*/ */
ol.source.Vector.prototype.removeFeature = function(feature) { ol.source.Vector.prototype.removeFeature = function(feature) {
var featureKey = goog.getUid(feature).toString(); var featureKey = goog.getUid(feature).toString();
@@ -501,7 +501,7 @@ ol.source.VectorEvent = function(type, opt_feature) {
/** /**
* The feature being added or removed. * The feature being added or removed.
* @type {ol.Feature|undefined} * @type {ol.Feature|undefined}
* @api * @api stable
*/ */
this.feature = opt_feature; this.feature = opt_feature;