Better type checking in Layer

This commit is contained in:
Tom Payne
2012-07-09 15:34:13 +02:00
committed by Tom Payne
parent dd3dead3cd
commit 5a7c2e72a6

View File

@@ -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);