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:
@@ -25,7 +25,6 @@
|
|||||||
numZoomLevels: 6
|
numZoomLevels: 6
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var ol_wms = new OpenLayers.Layer.WMS(
|
var ol_wms = new OpenLayers.Layer.WMS(
|
||||||
"OpenLayers WMS",
|
"OpenLayers WMS",
|
||||||
@@ -49,7 +48,10 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
map.addLayers([ol_wms, gwc, dm_wms]);
|
map.addLayers([ol_wms, gwc, dm_wms]);
|
||||||
map.zoomToMaxExtent();
|
|
||||||
|
if (!map.getCenter()) {
|
||||||
|
map.zoomToMaxExtent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user