From 5a7c2e72a69b3d8620e047eca05760fe3af109d9 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Mon, 9 Jul 2012 15:34:13 +0200 Subject: [PATCH] Better type checking in Layer --- src/ol/layer.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ol/layer.js b/src/ol/layer.js index d6234990a0..759230ef04 100644 --- a/src/ol/layer.js +++ b/src/ol/layer.js @@ -25,12 +25,15 @@ ol.Layer = function() { goog.base(this); + this.setExtent(null); + this.setProjection(null); + }; goog.inherits(ol.Layer, ol.Object); /** - * @return {string} Attribution. + * @return {string|undefined} Attribution. */ ol.Layer.prototype.getAttribution = function() { return /** @type {string} */ (this.get(ol.LayerProperty_.ATTRIBUTION)); @@ -54,7 +57,7 @@ ol.Layer.prototype.getProjection = function() { /** - * @param {string} attribution Attribution. + * @param {string|undefined} attribution Attribution. */ ol.Layer.prototype.setAttribution = function(attribution) { this.set(ol.LayerProperty_.ATTRIBUTION, attribution);