I'm trying to change the default center coords and zoom level for the map and
minimap. I have tried changing the options in ol_map.js in the createMap
function but that didn't work. Where can I set these values?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5744800.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
edit config-gui.xml, there you'll find settings for what you want.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745172.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
GeoUser wrote:
edit config-gui.xml, there you'll find settings for what you want.The only
settings I see for the map are the projection and bounds. I need to set
the "zoom" and "center" properties for the openlayers map.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745281.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
well you can take the center point and calculate bounds (substract and add
some value to x and y) for the specific zoom level and set this bounds in
config-gui
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745305.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
GeoUser wrote:
well you can take the center point and calculate bounds (substract and add
some value to x and y) for the specific zoom level and set this bounds in
config-gui
Thanks for the help. I've tried using the bounds which centers the map on
the correct location but does not zoom in when the map is initialized. It
also trims the layers according to those bounds which I don't want.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745342.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
you could try one more thing. and that is to open extentMap.js find function
'watchRadios' (line 544 or so) and add extentMap.map.zoomToMaxExtent(); as
the last function statement. just after Ext.get(wsen[3]).dom.value = n;
or you could make a call to extentMap.map.zoomTo(zoom level) instead of
calling zoomToMaxExtent
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745392.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
GeoUser wrote:
you could try one more thing. and that is to open extentMap.js find
function 'watchRadios' (line 544 or so) and add
extentMap.map.zoomToMaxExtent(); as the last function statement. just
after Ext.get(wsen[3]).dom.value = n;or you could make a call to extentMap.map.zoomTo(zoom level) instead of
calling zoomToMaxExtent
That didn't work. I tried changing the map options in main-page.xsl, line
367 to:
var mapOptions = {
projection: projection,
maxExtent: extent,
restrictedExtent: restrictedExtent,
center: new OpenLayers.LonLat( -69.254782, 45.315687),
zoom: 7
};
This changed the map center but not the zoom level.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5745548.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
daniel.smith1 wrote:
I'm trying to change the default center coords and zoom level for the map
and minimap. I have tried changing the options in ol_map.js in the
createMap function but that didn't work. Where can I set these values?
I see that Geonetwork 2.6.1 has been released. I've noticed in changes
there is:
"Added support for OpenLayers Map config options in map viewer"
Will this allow me to specify the initial center and zoom?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5746257.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.
Hi,
I'm on 2.6.1 and I have the same problem. I am able to change the default
mapSearch extent in config-gui.xml but the mapSearch cannot be panned to
other sectors.
Anyone knows how to get around this ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GN-2-6-Setting-map-zoom-and-center-tp5744800p5899178.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.