From 0e487a6d6b77108481073a5aaa159ab38c6fa5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 25 Feb 2011 15:25:26 +0000 Subject: [PATCH] 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 --- examples/controls.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/controls.html b/examples/controls.html index 720830d4c6..a7f9041a7d 100644 --- a/examples/controls.html +++ b/examples/controls.html @@ -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(); + } }