diff --git a/src/ol/feature.js b/src/ol/feature.js index 276efe83e8..3f69d4d8a0 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -46,7 +46,7 @@ ol.Feature = function(opt_geometryOrValues) { * @private * @type {ol.feature.FeatureStyleFunction|undefined} */ - this.styleFunction_; + this.styleFunction_ = undefined; /** * @private diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index 5123320e1b..978e0c1a2f 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -40,10 +40,10 @@ ol.layer.Vector = function(opt_options) { /** * Style function for use within the library. - * @type {ol.feature.StyleFunction} + * @type {ol.feature.StyleFunction|undefined} * @private */ - this.styleFunction_; + this.styleFunction_ = undefined; if (goog.isDef(options.style)) { this.setStyle(options.style); @@ -80,7 +80,7 @@ ol.layer.Vector.prototype.getStyle = function() { /** * Get the style function. - * @return {ol.feature.StyleFunction} Layer style function. + * @return {ol.feature.StyleFunction|undefined} Layer style function. * @todo stability experimental */ ol.layer.Vector.prototype.getStyleFunction = function() {