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

View File

@@ -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>