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

View File

@@ -25,13 +25,13 @@ ol.source.VectorEventType = {
/**
* Triggered when a feature is added to the source.
* @event ol.source.VectorEvent#addfeature
* @api
* @api stable
*/
ADDFEATURE: 'addfeature',
/**
* Triggered when a feature is removed from the source.
* @event ol.source.VectorEvent#removefeature
* @api
* @api stable
*/
REMOVEFEATURE: 'removefeature'
};
@@ -46,7 +46,7 @@ ol.source.VectorEventType = {
* @extends {ol.source.Source}
* @fires ol.source.VectorEvent
* @param {olx.source.VectorOptions=} opt_options Vector source options.
* @api
* @api stable
*/
ol.source.Vector = function(opt_options) {
@@ -102,7 +102,7 @@ goog.inherits(ol.source.Vector, ol.source.Source);
/**
* @param {ol.Feature} feature Feature.
* @api
* @api stable
*/
ol.source.Vector.prototype.addFeature = function(feature) {
this.addFeatureInternal(feature);
@@ -148,7 +148,7 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) {
/**
* @param {Array.<ol.Feature>} features Features.
* @api
* @api stable
*/
ol.source.Vector.prototype.addFeatures = function(features) {
this.addFeaturesInternal(features);
@@ -172,7 +172,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
/**
* Remove all features.
* @api
* @api stable
*/
ol.source.Vector.prototype.clear = function() {
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`.
* @return {S|undefined}
* @template T,S
* @api
* @api stable
*/
ol.source.Vector.prototype.forEachFeature = function(f, opt_this) {
return this.rBush_.forEach(f, opt_this);
@@ -249,7 +249,7 @@ ol.source.Vector.prototype.forEachFeatureInExtentAtResolution =
/**
* @return {Array.<ol.Feature>} Features.
* @api
* @api stable
*/
ol.source.Vector.prototype.getFeatures = function() {
var features = this.rBush_.getAll();
@@ -264,7 +264,7 @@ ol.source.Vector.prototype.getFeatures = function() {
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @return {Array.<ol.Feature>} Features.
* @api
* @api stable
*/
ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) {
var features = [];
@@ -287,7 +287,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @return {ol.Feature} Closest feature.
* @api
* @api stable
*/
ol.source.Vector.prototype.getClosestFeatureToCoordinate =
function(coordinate) {
@@ -334,7 +334,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate =
/**
* Get the extent of the features currently in the source.
* @return {ol.Extent} Extent.
* @api
* @api stable
*/
ol.source.Vector.prototype.getExtent = function() {
return this.rBush_.getExtent();
@@ -348,7 +348,7 @@ ol.source.Vector.prototype.getExtent = function() {
*
* @param {string|number} id Feature identifier.
* @return {ol.Feature} The feature (or `null` if not found).
* @api
* @api stable
*/
ol.source.Vector.prototype.getFeatureById = function(id) {
var feature = this.idIndex_[id.toString()];
@@ -426,7 +426,7 @@ ol.source.Vector.prototype.loadFeatures = goog.nullFunction;
/**
* @param {ol.Feature} feature Feature.
* @api
* @api stable
*/
ol.source.Vector.prototype.removeFeature = function(feature) {
var featureKey = goog.getUid(feature).toString();
@@ -501,7 +501,7 @@ ol.source.VectorEvent = function(type, opt_feature) {
/**
* The feature being added or removed.
* @type {ol.Feature|undefined}
* @api
* @api stable
*/
this.feature = opt_feature;