[GeoNetwork-users] Center map on specific country without disabling pan

Hi
I need to center my mapSearch and mapViewer.
I have tried changing the restrictedExtent in config-gui but this has the
undesired effect of bloking pan to the rest of the world.
Is there another way of doing this ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Center-map-on-specific-country-without-disabling-pan-tp5999871p5999871.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

I have been given the following command on the OpenLayers forum:
map.zoomToExtent(countryExtent);

I tried this out in various ways, in config-gui and in ol_minimap.js in
debug mode.
I was surprised it didn't work in config-gui when I tried this

  <mapSearch options="{projection: 'EPSG:4326',
         maxExtent: new OpenLayers.Bounds(-180,-90,180,90), units: 'm',
         restrictedExtent: new OpenLayers.Bounds(-180,-90,180,90),
         zoomToExtent: new OpenLayers.Bounds(-5,40,10,55))}"> ****
doesn't work here ****

But it works to do it in ol_map.js and in ol_minimap.js

This is how I did it. I just put it some place it works, might not be the
really propper place !
in ol_minimap.js:
line 216, after "addMapControls()"
miniMap.zoomToExtent(new OpenLayers.Bounds(-4,42,8,52));

and in ol_map.js:
line 1129:after "createViewport();"
map.zoomToExtent(new OpenLayers.Bounds(-2,44,6,50));

Users should know, as I have been told that these are not the active
javascript files. The active ones are in scripts/lib and are minified.
To see these changes work in ol_map and ol_minimap you have to be in debug
mode or you have to recompile from the trunk.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Center-map-on-specific-country-without-disabling-pan-tp5999871p6004198.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.