Merge pull request #2555 from elemoine/apistable1

Add @api stable annotations for the ol.source namespace
This commit is contained in:
Éric Lemoine
2014-08-22 17:57:23 +02:00
16 changed files with 111 additions and 112 deletions

View File

@@ -24,7 +24,7 @@ goog.require('ol.tilegrid.XYZ');
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.BingMapsOptions} options Bing Maps options.
* @api
* @api stable
*/
ol.source.BingMaps = function(options) {

View File

@@ -16,7 +16,7 @@ goog.require('ol.source.Image');
* @constructor
* @extends {ol.source.Image}
* @param {olx.source.ImageMapGuideOptions} options Options.
* @api
* @api stable
*/
ol.source.ImageMapGuide = function(options) {
@@ -105,7 +105,7 @@ goog.inherits(ol.source.ImageMapGuide, ol.source.Image);
* Get the user-provided params, i.e. those passed to the constructor through
* the "params" option, and possibly updated using the updateParams method.
* @return {Object} Params.
* @api
* @api stable
*/
ol.source.ImageMapGuide.prototype.getParams = function() {
return this.params_;
@@ -175,7 +175,7 @@ ol.source.ImageMapGuide.getScale = function(extent, size, metersPerUnit, dpi) {
/**
* Update the user-provided params.
* @param {Object} params Params.
* @api
* @api stable
*/
ol.source.ImageMapGuide.prototype.updateParams = function(params) {
goog.object.extend(this.params_, params);

View File

@@ -15,7 +15,7 @@ goog.require('ol.source.Image');
* @constructor
* @extends {ol.source.Image}
* @param {olx.source.ImageStaticOptions} options Options.
* @api
* @api stable
*/
ol.source.ImageStatic = function(options) {

View File

@@ -23,7 +23,7 @@ goog.require('ol.source.wms.ServerType');
* @constructor
* @extends {ol.source.Image}
* @param {olx.source.ImageWMSOptions=} opt_options Options.
* @api
* @api stable
*/
ol.source.ImageWMS = function(opt_options) {
@@ -123,7 +123,7 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
* in the `LAYERS` parameter will be used. `VERSION` should not be
* specified here.
* @return {string|undefined} GetFeatureInfo URL.
* @api
* @api stable
*/
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
@@ -163,7 +163,7 @@ ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
* Get the user-provided params, i.e. those passed to the constructor through
* the "params" option, and possibly updated using the updateParams method.
* @return {Object} Params.
* @api
* @api stable
*/
ol.source.ImageWMS.prototype.getParams = function() {
return this.params_;
@@ -304,7 +304,7 @@ ol.source.ImageWMS.prototype.getRequestUrl_ =
/**
* Return the URL used for this WMS source.
* @return {string|undefined} URL.
* @api
* @api stable
*/
ol.source.ImageWMS.prototype.getUrl = function() {
return this.url_;
@@ -313,7 +313,7 @@ ol.source.ImageWMS.prototype.getUrl = function() {
/**
* @param {string|undefined} url URL.
* @api
* @api stable
*/
ol.source.ImageWMS.prototype.setUrl = function(url) {
if (url != this.url_) {
@@ -327,7 +327,7 @@ ol.source.ImageWMS.prototype.setUrl = function(url) {
/**
* Update the user-provided params.
* @param {Object} params Params.
* @api
* @api stable
*/
ol.source.ImageWMS.prototype.updateParams = function(params) {
goog.object.extend(this.params_, params);

View File

@@ -15,7 +15,7 @@ goog.require('ol.source.XYZ');
* @constructor
* @extends {ol.source.XYZ}
* @param {olx.source.MapQuestOptions=} opt_options MapQuest options.
* @api
* @api stable
*/
ol.source.MapQuest = function(opt_options) {

View File

@@ -13,7 +13,7 @@ goog.require('ol.source.XYZ');
* @constructor
* @extends {ol.source.XYZ}
* @param {olx.source.OSMOptions=} opt_options Open Street Map options.
* @api
* @api stable
*/
ol.source.OSM = function(opt_options) {

View File

@@ -91,7 +91,7 @@ ol.source.Source.prototype.forEachFeatureAtPixel =
/**
* @return {Array.<ol.Attribution>} Attributions.
* @api
* @api stable
*/
ol.source.Source.prototype.getAttributions = function() {
return this.attributions_;
@@ -100,7 +100,7 @@ ol.source.Source.prototype.getAttributions = function() {
/**
* @return {string|olx.LogoOptions|undefined} Logo.
* @api
* @api stable
*/
ol.source.Source.prototype.getLogo = function() {
return this.logo_;

View File

@@ -85,7 +85,7 @@ ol.source.StamenProviderConfig = {
* @constructor
* @extends {ol.source.XYZ}
* @param {olx.source.StamenOptions} options Stamen options.
* @api
* @api stable
*/
ol.source.Stamen = function(options) {

View File

@@ -28,7 +28,7 @@ goog.require('ol.tilegrid.XYZ');
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.TileJSONOptions} options TileJSON options.
* @api
* @api stable
*/
ol.source.TileJSON = function(options) {

View File

@@ -165,7 +165,7 @@ ol.source.Tile.prototype.getTile = goog.abstractMethod;
/**
* @return {ol.tilegrid.TileGrid} Tile grid.
* @api
* @api stable
*/
ol.source.Tile.prototype.getTileGrid = function() {
return this.tileGrid;

View File

@@ -29,7 +29,7 @@ goog.require('ol.tilecoord');
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.TileWMSOptions=} opt_options Tile WMS options.
* @api
* @api stable
*/
ol.source.TileWMS = function(opt_options) {
@@ -123,7 +123,7 @@ goog.inherits(ol.source.TileWMS, ol.source.TileImage);
* in the `LAYERS` parameter will be used. `VERSION` should not be
* specified here.
* @return {string|undefined} GetFeatureInfo URL.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
@@ -196,7 +196,7 @@ ol.source.TileWMS.prototype.getKeyZXY = function(z, x, y) {
* Get the user-provided params, i.e. those passed to the constructor through
* the "params" option, and possibly updated using the updateParams method.
* @return {Object} Params.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.getParams = function() {
return this.params_;
@@ -296,7 +296,7 @@ ol.source.TileWMS.prototype.getTilePixelSize =
/**
* Return the URLs used for this WMS source.
* @return {!Array.<string>} URLs.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.getUrls = function() {
return this.urls_;
@@ -326,7 +326,7 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
/**
* @param {string|undefined} url URL.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.setUrl = function(url) {
var urls = goog.isDef(url) ? ol.TileUrlFunction.expandUrl(url) : null;
@@ -336,7 +336,7 @@ ol.source.TileWMS.prototype.setUrl = function(url) {
/**
* @param {Array.<string>|undefined} urls URLs.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.setUrls = function(urls) {
this.urls_ = goog.isDefAndNotNull(urls) ? urls : [];
@@ -401,7 +401,7 @@ ol.source.TileWMS.prototype.tileUrlFunction_ =
/**
* Update the user-provided params.
* @param {Object} params Params.
* @api
* @api stable
*/
ol.source.TileWMS.prototype.updateParams = function(params) {
goog.object.extend(this.params_, params);

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;

View File

@@ -34,7 +34,7 @@ ol.source.WMTSRequestEncoding = {
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.WMTSOptions} options WMTS options.
* @api
* @api stable
*/
ol.source.WMTS = function(options) {
@@ -196,7 +196,7 @@ goog.inherits(ol.source.WMTS, ol.source.TileImage);
* "dimensions" option, and possibly updated using the updateDimensions
* method.
* @return {Object} Dimensions.
* @api
* @api stable
*/
ol.source.WMTS.prototype.getDimensions = function() {
return this.dimensions_;
@@ -227,7 +227,7 @@ ol.source.WMTS.prototype.resetCoordKeyPrefix_ = function() {
/**
* Update the dimensions.
* @param {Object} dimensions Dimensions.
* @api
* @api stable
*/
ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
goog.object.extend(this.dimensions_, dimensions);
@@ -240,7 +240,6 @@ ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
* @param {Object} wmtsCap An object representing the capabilities document.
* @param {string} layer The layer identifier.
* @return {olx.source.WMTSOptions} WMTS source options object.
* @api
*/
ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, layer) {

View File

@@ -14,7 +14,7 @@ goog.require('ol.tilegrid.XYZ');
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.XYZOptions} options XYZ options.
* @api
* @api stable
*/
ol.source.XYZ = function(options) {
var projection = goog.isDef(options.projection) ?
@@ -69,7 +69,7 @@ ol.source.XYZ.prototype.setTileUrlFunction = function(tileUrlFunction) {
/**
* @param {string} url URL.
* @api
* @api stable
*/
ol.source.XYZ.prototype.setUrl = function(url) {
this.setTileUrlFunction(ol.TileUrlFunction.createFromTemplates(

View File

@@ -29,7 +29,7 @@ ol.source.ZoomifyTierSizeCalculation = {
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.ZoomifyOptions=} opt_options Options.
* @api
* @api stable
*/
ol.source.Zoomify = function(opt_options) {