From 094bedda9a39b6d82657064b5b7f7c2397c84848 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Fri, 24 Feb 2012 16:04:07 +0100 Subject: [PATCH] If maxResolution is not set, we want the serverResolution. After 2fe882f4d83728814c8ec387b13c0f89e8e74986, no default maxResolution is set. To make the Math.min not return 0, we need a fallback if no maxResolution was configured. --- lib/OpenLayers/Layer/Bing.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Layer/Bing.js b/lib/OpenLayers/Layer/Bing.js index 68ea9efd3a..b03b7e6815 100644 --- a/lib/OpenLayers/Layer/Bing.js +++ b/lib/OpenLayers/Layer/Bing.js @@ -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