Disallowed undefined 'maxResolution' value

This commit is contained in:
Frederic Junod
2015-01-27 18:05:07 +01:00
parent 60ea87fdfb
commit 1d6f7e9504
2 changed files with 8 additions and 4 deletions

View File

@@ -152,7 +152,7 @@ ol.layer.Base.prototype.getLayerState = function() {
sourceState: sourceState,
visible: visible,
extent: extent,
maxResolution: goog.isDef(maxResolution) ? maxResolution : Infinity,
maxResolution: maxResolution,
minResolution: goog.isDef(minResolution) ? Math.max(minResolution, 0) : 0
};
};
@@ -190,12 +190,12 @@ goog.exportProperty(
/**
* @return {number|undefined} The maximum resolution of the layer.
* @return {number} The maximum resolution of the layer.
* @observable
* @api stable
*/
ol.layer.Base.prototype.getMaxResolution = function() {
return /** @type {number|undefined} */ (
return /** @type {number} */ (
this.get(ol.layer.LayerProperty.MAX_RESOLUTION));
};
goog.exportProperty(
@@ -349,7 +349,7 @@ goog.exportProperty(
/**
* @param {number|undefined} maxResolution The maximum resolution of the layer.
* @param {number} maxResolution The maximum resolution of the layer.
* @observable
* @api stable
*/