Augment r618 by allowing the more prosaic and self-documenting { maxResolution: 'auto' }.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@619 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-06-19 21:09:31 +00:00
parent 00d14534d2
commit 9e8c2f3802

View File

@@ -89,7 +89,7 @@ OpenLayers.Map.prototype = {
this.updateSize();
// make the entire maxExtent fix in zoom level 0 by default
if (this.maxResolution == null) {
if (this.maxResolution == null || this.resolution == "auto") {
this.maxResolution = Math.max(
this.maxExtent.getWidth() / this.size.w,
this.maxExtent.getHeight() / this.size.h );