Consistency: get/setMaxResolution instead of get/setMaxRes.
This commit is contained in:
@@ -88,7 +88,7 @@ ol.map = function(opt_arg) {
|
||||
map.setMaxExtent(ol.bounds(maxExtent));
|
||||
}
|
||||
if (goog.isDef(maxRes)) {
|
||||
map.setMaxRes(maxRes);
|
||||
map.setMaxResolution(maxRes);
|
||||
}
|
||||
if (goog.isDef(resolutions)) {
|
||||
map.setResolutions(resolutions);
|
||||
|
||||
@@ -231,7 +231,7 @@ ol.Map.prototype.getMaxExtent = function() {
|
||||
/**
|
||||
* @return {number} the max resolution for the map
|
||||
*/
|
||||
ol.Map.prototype.getMaxRes = function() {
|
||||
ol.Map.prototype.getMaxResolution = function() {
|
||||
if (goog.isDefAndNotNull(this.maxRes_)) {
|
||||
return this.maxRes_;
|
||||
} else {
|
||||
@@ -253,7 +253,7 @@ ol.Map.prototype.getResolutionForZoom = function(zoom) {
|
||||
if (goog.isDefAndNotNull(this.resolutions_)) {
|
||||
return this.resolutions_[zoom];
|
||||
} else {
|
||||
var maxRes = this.getMaxRes();
|
||||
var maxRes = this.getMaxResolution();
|
||||
return maxRes/Math.pow(ol.Map.ZOOM_FACTOR, zoom);
|
||||
}
|
||||
};
|
||||
@@ -343,7 +343,7 @@ ol.Map.prototype.setMaxExtent = function(extent) {
|
||||
/**
|
||||
* @param {number} res the max resolution for the map
|
||||
*/
|
||||
ol.Map.prototype.setMaxRes = function(res) {
|
||||
ol.Map.prototype.setMaxResolution = function(res) {
|
||||
this.maxRes_ = res;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user