fix warnings

This commit is contained in:
Mike Adair
2012-06-20 08:41:47 -04:00
parent 99b397bffc
commit 00e25d3a62

View File

@@ -42,19 +42,19 @@ ol.Map = function() {
/** /**
* @private * @private
* @type {Array|undefined} * @type {Array}
*/ */
this.resolutions_ = null; this.resolutions_ = null;
/** /**
* @private * @private
* @type {Array|undefined} * @type {Array}
*/ */
this.layers_ = null; this.layers_ = null;
/** /**
* @private * @private
* @type {ol.UnreferencedBounds|undefined} * @type {ol.UnreferencedBounds}
*/ */
this.maxExtent_ = null; this.maxExtent_ = null;
@@ -62,7 +62,7 @@ ol.Map = function() {
* @private * @private
* @type {number|undefined} * @type {number|undefined}
*/ */
this.maxRes_ = null; this.maxRes_ = undefined;
}; };
@@ -174,13 +174,11 @@ ol.Map.prototype.getMaxRes = function() {
return this.maxRes_; return this.maxRes_;
} else { } else {
var extent = this.getMaxExtent(); var extent = this.getMaxExtent();
if (goog.isDefAndNotNull(extent)) { var dim = Math.max(
var dim = Math.max( (extent.getMaxX()-extent.getMinX()),
(extent.getMaxX()-extent.getMinX()), (extent.getMaxY()-extent.getMinY())
(extent.getMaxY()-extent.getMinY()) );
); return dim/ol.Map.DEFAULT_TILE_SIZE;
return dim/ol.Map.DEFAULT_TILE_SIZE;
}
} }
}; };
@@ -253,7 +251,7 @@ ol.Map.prototype.setLayers = function(layers) {
}; };
/** /**
* @param {ol.Bounds} extent the maxExtent for the map * @param {ol.UnreferencedBounds} extent the maxExtent for the map
*/ */
ol.Map.prototype.setMaxExtent = function(extent) { ol.Map.prototype.setMaxExtent = function(extent) {
this.maxExtent_ = extent; this.maxExtent_ = extent;