From 0ec5201f3a6bdf253776e94e188db5811e66f889 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 13 Feb 2014 10:37:10 -0700 Subject: [PATCH] Documentation and exports --- src/ol/feature.exports | 5 +++-- src/ol/featureoverlay.exports | 2 ++ src/ol/featureoverlay.js | 6 ++++++ src/ol/layer/vectorlayer.exports | 2 ++ src/ol/layer/vectorlayer.js | 10 ++++++---- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/ol/feature.exports b/src/ol/feature.exports index fda1ed0384..6c1f200ea6 100644 --- a/src/ol/feature.exports +++ b/src/ol/feature.exports @@ -1,7 +1,8 @@ @exportSymbol ol.Feature @exportProperty ol.Feature.prototype.getGeometryName -@exportProperty ol.Feature.prototype.setGeometryName @exportProperty ol.Feature.prototype.getId -@exportProperty ol.Feature.prototype.setId @exportProperty ol.Feature.prototype.getStyle +@exportProperty ol.Feature.prototype.getStyleFunction +@exportProperty ol.Feature.prototype.setGeometryName +@exportProperty ol.Feature.prototype.setId @exportProperty ol.Feature.prototype.setStyle diff --git a/src/ol/featureoverlay.exports b/src/ol/featureoverlay.exports index cf40b7937a..9cfe34b200 100644 --- a/src/ol/featureoverlay.exports +++ b/src/ol/featureoverlay.exports @@ -1,6 +1,8 @@ @exportSymbol ol.FeatureOverlay @exportProperty ol.FeatureOverlay.prototype.addFeature @exportProperty ol.FeatureOverlay.prototype.getFeatures +@exportProperty ol.FeatureOverlay.prototype.getStyle +@exportProperty ol.FeatureOverlay.prototype.getStyleFunction @exportProperty ol.FeatureOverlay.prototype.setFeatures @exportProperty ol.FeatureOverlay.prototype.setMap @exportProperty ol.FeatureOverlay.prototype.setStyle diff --git a/src/ol/featureoverlay.js b/src/ol/featureoverlay.js index 6d9ac8863e..4962b7cd18 100644 --- a/src/ol/featureoverlay.js +++ b/src/ol/featureoverlay.js @@ -241,6 +241,9 @@ ol.FeatureOverlay.prototype.setMap = function(map) { /** + * Set the style for features. This can be a single style object, an array + * of styles, or a function that takes a feature and resolution and returns + * an array of styles. * @param {ol.style.Style|Array.|ol.feature.StyleFunction} style * Overlay style. * @todo stability experimental @@ -253,6 +256,8 @@ ol.FeatureOverlay.prototype.setStyle = function(style) { /** + * Get the style for features. This returns whatever was passed to the `style` + * option at construction or to the `setStyle` method. * @return {ol.style.Style|Array.|ol.feature.StyleFunction} * Overlay style. */ @@ -262,6 +267,7 @@ ol.FeatureOverlay.prototype.getStyle = function() { /** + * Get the style function. * @return {ol.feature.StyleFunction|undefined} Style function. */ ol.FeatureOverlay.prototype.getStyleFunction = function() { diff --git a/src/ol/layer/vectorlayer.exports b/src/ol/layer/vectorlayer.exports index ac7d597027..be493b810d 100644 --- a/src/ol/layer/vectorlayer.exports +++ b/src/ol/layer/vectorlayer.exports @@ -1,2 +1,4 @@ @exportSymbol ol.layer.Vector +@exportProperty ol.layer.Vector.prototype.getStyle +@exportProperty ol.layer.Vector.prototype.getStyleFunction @exportProperty ol.layer.Vector.prototype.setStyle diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index 291c466656..5123320e1b 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -68,9 +68,10 @@ goog.exportProperty( /** + * Get the style for features. This returns whatever was passed to the `style` + * option at construction or to the `setStyle` method. * @return {ol.style.Style|Array.|ol.feature.StyleFunction} * Layer style. - * @todo stability experimental */ ol.layer.Vector.prototype.getStyle = function() { return this.style_; @@ -78,6 +79,7 @@ ol.layer.Vector.prototype.getStyle = function() { /** + * Get the style function. * @return {ol.feature.StyleFunction} Layer style function. * @todo stability experimental */ @@ -103,9 +105,9 @@ goog.exportProperty( /** - * If the styles are changed by setting a new style function or by changing the - * value returned by the style function then `dispatchChangeEvent` should be - * called on the layer for the layer to be refreshed on the screen. + * Set the style for features. This can be a single style object, an array + * of styles, or a function that takes a feature and resolution and returns + * an array of styles. * @param {ol.style.Style|Array.|ol.feature.StyleFunction} style * Layer style. * @todo stability experimental