[OpenLayers-Commits] r11513 - trunk/openlayers/examples

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


Author: erilem
Date: 2011-02-25 07:25:26 -0800 (Fri, 25 Feb 2011)
New Revision: 11513

Modified:
   trunk/openlayers/examples/controls.html
Log:
call zoomToMaxExtent only if the ArgParser didn't center the map itself, examples only change, thanks cmoullet for catching this

Modified: trunk/openlayers/examples/controls.html
===================================================================
--- trunk/openlayers/examples/controls.html	2011-02-25 15:25:11 UTC (rev 11512)
+++ trunk/openlayers/examples/controls.html	2011-02-25 15:25:26 UTC (rev 11513)
@@ -25,7 +25,6 @@
                     numZoomLevels: 6
                     
                 });
-    
 
                 var ol_wms = new OpenLayers.Layer.WMS(
                     "OpenLayers WMS",
@@ -49,7 +48,10 @@
                 );
 
                 map.addLayers([ol_wms, gwc, dm_wms]);
-                map.zoomToMaxExtent();
+
+                if (!map.getCenter()) {
+                    map.zoomToMaxExtent();
+                }
             }
         </script>
     </head>



More information about the Commits mailing list