call zoomToMaxExtent only if the ArgParser didn't center the map itself, examples only change, thanks cmoullet for catching this

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11513 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-02-25 15:25:26 +00:00
parent a076ce9228
commit 0e487a6d6b
+3 -1
View File
@@ -26,7 +26,6 @@
}); });
var ol_wms = new OpenLayers.Layer.WMS( var ol_wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS", "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", "http://vmap0.tiles.osgeo.org/wms/vmap0",
@@ -49,8 +48,11 @@
); );
map.addLayers([ol_wms, gwc, dm_wms]); map.addLayers([ol_wms, gwc, dm_wms]);
if (!map.getCenter()) {
map.zoomToMaxExtent(); map.zoomToMaxExtent();
} }
}
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">