[OpenLayers-Commits] r11516 - sandbox/ahocevar/layercontainer/lib/OpenLayers

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Fri Feb 25 10:52:43 EST 2011


Author: ahocevar
Date: 2011-02-25 07:52:42 -0800 (Fri, 25 Feb 2011)
New Revision: 11516

Modified:
   sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js
Log:
fixed issue with undefined resolution in the case where zoom is not set

Modified: sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js
===================================================================
--- sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js	2011-02-25 15:52:36 UTC (rev 11515)
+++ sandbox/ahocevar/layercontainer/lib/OpenLayers/Map.js	2011-02-25 15:52:42 UTC (rev 11516)
@@ -1818,7 +1818,8 @@
                 this.center = lonlat.clone();
             }
 
-            var res = this.getResolutionForZoom(zoom);
+            var res = zoomChanged ?
+                this.getResolutionForZoom(zoom) : this.getResolution();
             // (re)set the layerContainerDiv's location
             if (zoomChanged || this.layerContainerOrigin == null) {
                 this.layerContainerOrigin = this.getCachedCenter();



More information about the Commits mailing list