Hello,
regarding the OL Map Viewer of GN 2.6x I have some problems with setting
up the scales, map extent etc.:
(1) My Map Viewer section in config-gui.xml looks like this:
<mapViewer options="{projection: 'EPSG:4326', maxExtent: new
OpenLayers.Bounds(6.5,47.3,9.3,50.0), units: 'm', restrictedExtent: new
OpenLayers.Bounds(6.5,47.3,9.3,50.0)}">
<layers>
<layer server="http://localhost:8080/geoserver/wms" tocName="Zones"
params="{layers: 'gn:areaf_geo', transparent: 'true', format:
'image/png'}" options="{}" />
<layer server="http://localhost:8080/geoserver/wms" tocName="SRTM
(Colour)" params="{layers: 'gn:srtmg_geo', format: 'image/jpeg'}"
options="{isBaseLayer: true}" />
<layer server="http://localhost:8080/geoserver/wms"
tocName="Topography" params="{layers: 'gn:topo_geo', transparent:
'true',format: 'image/png'}" options="{}" />
<layer server="http://localhost:8080/geoserver/wms" tocName="SRTM
(Grey Scale)" params="{layers: 'gn:srtmhsg_geo', format: 'image/jpeg'}"
options="{isBaseLayer: true}" />
</layers>
<scales values="[2000000, 1000000, 500000, 250000, 100000, 50000,
25000]"/>
<proj>
<crs code="EPSG:4326" default="1" name="WGS84 (lat/lon)" />
</proj>
<servers>
<server name="Geoserver" url="http://localhost:8080/geoserver/wms?"
/>
</servers>
</mapViewer>
The OpenLayers.Bounds seem to work every time I click the full extent in
the viewer. But the default extent is much larger when startin GN.
The <scales values> do not apply at all. Scales are set to a row of
default values (like 1 : 48576205,...) in the drop-down menu.
(2) The OpenLayers window sometimes closes when dragging the cursor
outside the map window. I would like to open and close the viewer only
by clicking the Open/Close Button at the very top of the Viewer.
(3) The FeatureInfo in OpenLayers basically works very good. However, I
would like to hide some attributes of WMS layers and declare an alias
name of attributes for a better understanding of what the attributes
actually mean (e.g., renaming attribute "cntry" to "Name of the Country"
or whatever). In the OpenLayers preview of GeoServer the styling and
content of WMS GetFeatureInfo can be done by defining templates
(header.ftl, footer.ftl, content.ftl). How can I configure the
FeatureInfo Popup in the GN OpenLayers to rename and hide attributes?
I am basically using the default installation of GN 2.6.2 with
GeoServer, PostgreSQL and use Mozilla Firefox for browsing. Many thanks
in advance for any suggestions on one or more of the questions.
Best regards,
Heiko