If maxResolution is not set, we want the serverResolution.

After 2fe882f4d8, no default maxResolution is set. To make the Math.min not return 0, we need a fallback if no maxResolution was configured.
This commit is contained in:
ahocevar
2012-02-24 16:04:07 +01:00
parent 8ce712adb6
commit 094bedda9a

View File

@@ -169,7 +169,8 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
}
this.addOptions({
maxResolution: Math.min(
this.serverResolutions[res.zoomMin], this.maxResolution
this.serverResolutions[res.zoomMin],
this.maxResolution || Number.POSITIVE_INFINITY
),
numZoomLevels: Math.min(
res.zoomMax + 1 - res.zoomMin, this.numZoomLevels