From efc32b14df62254ca1b3b6e8558b93156dc3e47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:24:32 +0200 Subject: [PATCH 1/8] Add @api stable annotations to ol.layer.Base --- externs/olx.js | 9 +++++---- src/ol/layer/layerbase.js | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 9a1cad5491..5e554135d9 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2348,7 +2348,7 @@ olx.layer.BaseOptions.prototype.hue; /** * Opacity (0, 1). Default is `1`. * @type {number|undefined} - * @api + * @api stable */ olx.layer.BaseOptions.prototype.opacity; @@ -2364,7 +2364,7 @@ olx.layer.BaseOptions.prototype.saturation; /** * Visibility. Default is `true`. * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.BaseOptions.prototype.visible; @@ -2373,7 +2373,7 @@ olx.layer.BaseOptions.prototype.visible; * The bounding extent for layer rendering. The layer will not be rendered * outside of this extent. * @type {ol.Extent|undefined} - * @api + * @api stable */ olx.layer.BaseOptions.prototype.extent; @@ -2381,7 +2381,7 @@ olx.layer.BaseOptions.prototype.extent; /** * The minimum resolution (inclusive) at which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.BaseOptions.prototype.minResolution; @@ -2389,6 +2389,7 @@ olx.layer.BaseOptions.prototype.minResolution; /** * The maximum resolution (exclusive) below which this layer will be visible. * @type {number|undefined} + * @api stable */ olx.layer.BaseOptions.prototype.maxResolution; diff --git a/src/ol/layer/layerbase.js b/src/ol/layer/layerbase.js index 51652f0cde..8ec391e50f 100644 --- a/src/ol/layer/layerbase.js +++ b/src/ol/layer/layerbase.js @@ -181,7 +181,7 @@ ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod; /** * @return {ol.Extent|undefined} The layer extent. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.getExtent = function() { return /** @type {ol.Extent|undefined} */ ( @@ -196,7 +196,7 @@ goog.exportProperty( /** * @return {number|undefined} The maximum resolution of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.getMaxResolution = function() { return /** @type {number|undefined} */ ( @@ -211,7 +211,7 @@ goog.exportProperty( /** * @return {number|undefined} The minimum resolution of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.getMinResolution = function() { return /** @type {number|undefined} */ ( @@ -226,7 +226,7 @@ goog.exportProperty( /** * @return {number|undefined} The opacity of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.getOpacity = function() { return /** @type {number|undefined} */ ( @@ -262,7 +262,7 @@ ol.layer.Base.prototype.getSourceState = goog.abstractMethod; /** * @return {boolean|undefined} The visiblity of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.getVisible = function() { return /** @type {boolean|undefined} */ ( @@ -344,7 +344,7 @@ goog.exportProperty( * will be visible at all extents. * @param {ol.Extent|undefined} extent The extent of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.setExtent = function(extent) { this.set(ol.layer.LayerProperty.EXTENT, extent); @@ -358,7 +358,7 @@ goog.exportProperty( /** * @param {number|undefined} maxResolution The maximum resolution of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.setMaxResolution = function(maxResolution) { this.set(ol.layer.LayerProperty.MAX_RESOLUTION, maxResolution); @@ -372,7 +372,7 @@ goog.exportProperty( /** * @param {number|undefined} minResolution The minimum resolution of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.setMinResolution = function(minResolution) { this.set(ol.layer.LayerProperty.MIN_RESOLUTION, minResolution); @@ -386,7 +386,7 @@ goog.exportProperty( /** * @param {number|undefined} opacity The opacity of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.setOpacity = function(opacity) { this.set(ol.layer.LayerProperty.OPACITY, opacity); @@ -419,7 +419,7 @@ goog.exportProperty( /** * @param {boolean|undefined} visible The visiblity of the layer. * @observable - * @api + * @api stable */ ol.layer.Base.prototype.setVisible = function(visible) { this.set(ol.layer.LayerProperty.VISIBLE, visible); From 15487d1ce99438cb6f4ff7c707d01bf09d1116a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:25:35 +0200 Subject: [PATCH 2/8] Add @api stable annotations to ol.layer.Layer --- externs/olx.js | 12 ++++++------ src/ol/layer/layer.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 5e554135d9..406ec9b2a7 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2437,7 +2437,7 @@ olx.layer.LayerOptions.prototype.hue; /** * Opacity (0, 1). Default is `1`. * @type {number|undefined} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.opacity; @@ -2453,7 +2453,7 @@ olx.layer.LayerOptions.prototype.saturation; /** * Source for this layer. * @type {ol.source.Source} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.source; @@ -2461,7 +2461,7 @@ olx.layer.LayerOptions.prototype.source; /** * Visibility. Default is `true` (visible). * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.visible; @@ -2470,7 +2470,7 @@ olx.layer.LayerOptions.prototype.visible; * The bounding extent for layer rendering. The layer will not be rendered * outside of this extent. * @type {ol.Extent|undefined} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.extent; @@ -2478,7 +2478,7 @@ olx.layer.LayerOptions.prototype.extent; /** * The minimum resolution (inclusive) at which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.minResolution; @@ -2486,7 +2486,7 @@ olx.layer.LayerOptions.prototype.minResolution; /** * The maximum resolution (exclusive) below which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.LayerOptions.prototype.maxResolution; diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index 1b244edd53..bcea83ac7d 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -22,7 +22,7 @@ goog.require('ol.source.Source'); * @fires ol.render.Event * @fires change Triggered when the state of the source changes. * @param {olx.layer.LayerOptions} options Layer options. - * @api + * @api stable */ ol.layer.Layer = function(options) { @@ -80,7 +80,7 @@ ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) { /** * @return {ol.source.Source} Source. - * @api + * @api stable */ ol.layer.Layer.prototype.getSource = function() { return this.source_; From e50ba2172f6561909a1a27d46148cabdd981544c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:25:53 +0200 Subject: [PATCH 3/8] Add @api stable annotations to ol.layer.Group --- externs/olx.js | 12 +++++++----- src/ol/layer/layergroup.js | 6 +++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 406ec9b2a7..ab2364f048 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2534,6 +2534,7 @@ olx.layer.GroupOptions.prototype.hue; /** * Opacity (0, 1). Default is `1`. * @type {number|undefined} + * @api stable */ olx.layer.GroupOptions.prototype.opacity; @@ -2541,6 +2542,7 @@ olx.layer.GroupOptions.prototype.opacity; /** * Saturation. Default is `1`. * @type {number|undefined} + * @api */ olx.layer.GroupOptions.prototype.saturation; @@ -2548,7 +2550,7 @@ olx.layer.GroupOptions.prototype.saturation; /** * Visibility. Default is `true`. * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.GroupOptions.prototype.visible; @@ -2557,7 +2559,7 @@ olx.layer.GroupOptions.prototype.visible; * The bounding extent for layer rendering. The layer will not be rendered * outside of this extent. * @type {ol.Extent|undefined} - * @api + * @api stable */ olx.layer.GroupOptions.prototype.extent; @@ -2565,7 +2567,7 @@ olx.layer.GroupOptions.prototype.extent; /** * The minimum resolution (inclusive) at which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.GroupOptions.prototype.minResolution; @@ -2573,7 +2575,7 @@ olx.layer.GroupOptions.prototype.minResolution; /** * The maximum resolution (exclusive) below which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.GroupOptions.prototype.maxResolution; @@ -2581,7 +2583,7 @@ olx.layer.GroupOptions.prototype.maxResolution; /** * Child layers. * @type {Array.|ol.Collection.|undefined} - * @api + * @api stable */ olx.layer.GroupOptions.prototype.layers; diff --git a/src/ol/layer/layergroup.js b/src/ol/layer/layergroup.js index b89e46435f..c685a6ec2c 100644 --- a/src/ol/layer/layergroup.js +++ b/src/ol/layer/layergroup.js @@ -33,7 +33,7 @@ ol.layer.GroupProperty = { * @extends {ol.layer.Base} * @fires change Triggered when the group/Collection changes. * @param {olx.layer.GroupOptions=} opt_options Layer options. - * @api + * @api stable */ ol.layer.Group = function(opt_options) { @@ -148,7 +148,7 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) { * @return {ol.Collection.|undefined} Collection of * {@link ol.layer.Layer layers} that are part of this group. * @observable - * @api + * @api stable */ ol.layer.Group.prototype.getLayers = function() { return /** @type {ol.Collection.|undefined} */ (this.get( @@ -164,7 +164,7 @@ goog.exportProperty( * @param {ol.Collection.|undefined} layers Collection of * {@link ol.layer.Layer layers} that are part of this group. * @observable - * @api + * @api stable */ ol.layer.Group.prototype.setLayers = function(layers) { this.set(ol.layer.GroupProperty.LAYERS, layers); From ee745f8c9e430cbe91c88f2b3bdd1ab96103c995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:26:12 +0200 Subject: [PATCH 4/8] Add @api stable annotations to ol.layer.Image --- src/ol/layer/imagelayer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/layer/imagelayer.js b/src/ol/layer/imagelayer.js index 49d85396cb..e885a9cbc9 100644 --- a/src/ol/layer/imagelayer.js +++ b/src/ol/layer/imagelayer.js @@ -16,7 +16,7 @@ goog.require('ol.layer.Layer'); * @extends {ol.layer.Layer} * @fires ol.render.Event * @param {olx.layer.LayerOptions} options Layer options. - * @api + * @api stable */ ol.layer.Image = function(options) { goog.base(this, options); From 1085d4f15254ceb153474c1da9159a26b6bba8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:26:48 +0200 Subject: [PATCH 5/8] Add @api stable annotations to ol.layer.Tile --- externs/olx.js | 16 ++++++++-------- src/ol/layer/tilelayer.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index ab2364f048..5c6258766f 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2778,7 +2778,7 @@ olx.layer.TileOptions.prototype.hue; /** * Opacity (0, 1). Default is `1`. * @type {number|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.opacity; @@ -2786,7 +2786,7 @@ olx.layer.TileOptions.prototype.opacity; /** * Preload. * @type {number|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.preload; @@ -2802,7 +2802,7 @@ olx.layer.TileOptions.prototype.saturation; /** * Source for this layer. * @type {ol.source.Source} - * @api + * @api stable */ olx.layer.TileOptions.prototype.source; @@ -2810,7 +2810,7 @@ olx.layer.TileOptions.prototype.source; /** * Visibility. Default is `true` (visible). * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.visible; @@ -2819,7 +2819,7 @@ olx.layer.TileOptions.prototype.visible; * The bounding extent for layer rendering. The layer will not be rendered * outside of this extent. * @type {ol.Extent|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.extent; @@ -2827,7 +2827,7 @@ olx.layer.TileOptions.prototype.extent; /** * The minimum resolution (inclusive) at which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.minResolution; @@ -2835,7 +2835,7 @@ olx.layer.TileOptions.prototype.minResolution; /** * The maximum resolution (exclusive) below which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.maxResolution; @@ -2843,7 +2843,7 @@ olx.layer.TileOptions.prototype.maxResolution; /** * Use interim tiles on error. Default is `true`. * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.TileOptions.prototype.useInterimTilesOnError; diff --git a/src/ol/layer/tilelayer.js b/src/ol/layer/tilelayer.js index 133e37b436..0e9990fc66 100644 --- a/src/ol/layer/tilelayer.js +++ b/src/ol/layer/tilelayer.js @@ -25,7 +25,7 @@ ol.layer.TileProperty = { * @extends {ol.layer.Layer} * @fires ol.render.Event * @param {olx.layer.TileOptions} options Tile layer options. - * @api + * @api stable */ ol.layer.Tile = function(options) { goog.base(this, options); From 3ced2d826644db911f4d8d1cbbe59b53449012f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:27:04 +0200 Subject: [PATCH 6/8] Add @api stable annotations to ol.layer.Vector --- externs/olx.js | 14 +++++++------- src/ol/layer/vectorlayer.js | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 5c6258766f..4503fa4b67 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2903,7 +2903,7 @@ olx.layer.VectorOptions.prototype.hue; * The bounding extent for layer rendering. The layer will not be rendered * outside of this extent. * @type {ol.Extent|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.extent; @@ -2911,7 +2911,7 @@ olx.layer.VectorOptions.prototype.extent; /** * The minimum resolution (inclusive) at which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.minResolution; @@ -2919,7 +2919,7 @@ olx.layer.VectorOptions.prototype.minResolution; /** * The maximum resolution (exclusive) below which this layer will be visible. * @type {number|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.maxResolution; @@ -2927,7 +2927,7 @@ olx.layer.VectorOptions.prototype.maxResolution; /** * Opacity. 0-1. Default is `1`. * @type {number|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.opacity; @@ -2943,7 +2943,7 @@ olx.layer.VectorOptions.prototype.saturation; /** * Source. * @type {ol.source.Vector} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.source; @@ -2952,7 +2952,7 @@ olx.layer.VectorOptions.prototype.source; * Layer style. See {@link ol.style} for default style which will be used if * this is not defined. * @type {ol.style.Style|Array.|ol.style.StyleFunction|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.style; @@ -2960,7 +2960,7 @@ olx.layer.VectorOptions.prototype.style; /** * Visibility. Default is `true` (visible). * @type {boolean|undefined} - * @api + * @api stable */ olx.layer.VectorOptions.prototype.visible; diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index e7a9561967..4ac8000bc8 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -25,7 +25,7 @@ ol.layer.VectorProperty = { * @extends {ol.layer.Layer} * @fires ol.render.Event * @param {olx.layer.VectorOptions=} opt_options Options. - * @api + * @api stable */ ol.layer.Vector = function(opt_options) { @@ -73,7 +73,7 @@ ol.layer.Vector.prototype.getRenderOrder = function() { * option at construction or to the `setStyle` method. * @return {ol.style.Style|Array.|ol.style.StyleFunction} * Layer style. - * @api + * @api stable */ ol.layer.Vector.prototype.getStyle = function() { return this.style_; @@ -83,7 +83,7 @@ ol.layer.Vector.prototype.getStyle = function() { /** * Get the style function. * @return {ol.style.StyleFunction|undefined} Layer style function. - * @api + * @api stable */ ol.layer.Vector.prototype.getStyleFunction = function() { return this.styleFunction_; @@ -105,7 +105,7 @@ ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) { * an array of styles. * @param {ol.style.Style|Array.|ol.style.StyleFunction} style * Layer style. - * @api + * @api stable */ ol.layer.Vector.prototype.setStyle = function(style) { this.style_ = style; From bbeb4442a5a127c8061be9e74f84ae6a899972e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 18 Aug 2014 17:28:11 +0200 Subject: [PATCH 7/8] Add @api annotations to ol.layer.Tile --- src/ol/layer/tilelayer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ol/layer/tilelayer.js b/src/ol/layer/tilelayer.js index 0e9990fc66..9b7f3387a9 100644 --- a/src/ol/layer/tilelayer.js +++ b/src/ol/layer/tilelayer.js @@ -37,6 +37,7 @@ goog.inherits(ol.layer.Tile, ol.layer.Layer); /** * @return {number|undefined} The level to preload tiles up to. * @observable + * @api */ ol.layer.Tile.prototype.getPreload = function() { return /** @type {number|undefined} */ ( @@ -51,6 +52,7 @@ goog.exportProperty( /** * @param {number} preload The level to preload tiles up to. * @observable + * @api */ ol.layer.Tile.prototype.setPreload = function(preload) { this.set(ol.layer.TileProperty.PRELOAD, preload); @@ -63,6 +65,8 @@ goog.exportProperty( /** * @return {boolean|undefined} Use interim tiles on error. + * @observable + * @api */ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() { return /** @type {boolean|undefined} */ ( @@ -76,6 +80,8 @@ goog.exportProperty( /** * @param {boolean|undefined} useInterimTilesOnError Use interim tiles on error. + * @observable + * @api */ ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) { From 5ce4e748f59833b687aa0d8e5a1859a29e50e086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 22 Aug 2014 18:38:22 +0200 Subject: [PATCH 8/8] Add docs for the tile layer preload option --- externs/olx.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/externs/olx.js b/externs/olx.js index 4503fa4b67..e8e1693526 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2784,7 +2784,8 @@ olx.layer.TileOptions.prototype.opacity; /** - * Preload. + * Preload. Load low-resolution tiles up to `preload` levels. By default + * `preload` is `0`, which means no preloading. * @type {number|undefined} * @api stable */