[GeoNetwork-users] OpenLayers configuration in GN 2.6.x

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&quot; tocName="Zones"
params="{layers: 'gn:areaf_geo', transparent: 'true', format:
'image/png'}" options="{}" />
    <layer server="http://localhost:8080/geoserver/wms&quot; tocName="SRTM
(Colour)" params="{layers: 'gn:srtmg_geo', format: 'image/jpeg'}"
options="{isBaseLayer: true}" />
    <layer server="http://localhost:8080/geoserver/wms&quot;
tocName="Topography" params="{layers: 'gn:topo_geo', transparent:
'true',format: 'image/png'}" options="{}" />
    <layer server="http://localhost:8080/geoserver/wms&quot; 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?&quot;
/>
  </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

Hi Heiko,

I too am having this difficulty. Did you ever find a solution?

Cheers,
Byron

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-configuration-in-GN-2-6-x-tp6679658p6946495.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

Hi Byron,

unfortunately not... Setting up the desired default extent, scales values and changing the projection of the OL map with config-gui.xml still remains a mystery to me, so I would still be very thankful for any help on that problem.

Cheers,
Heiko

-----Ursprüngliche Nachricht-----
Von: ByronCinNZ [mailto:cochranes4@anonymised.com]
Gesendet: Sonntag, 30. Oktober 2011 23:08
An: geonetwork-users@lists.sourceforge.net
Betreff: Re: [GeoNetwork-users] OpenLayers configuration in GN 2.6.x

Hi Heiko,

I too am having this difficulty. Did you ever find a solution?

Cheers,
Byron

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-configuration-in-GN-2-6-x-tp6679658p6946495.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple
it is! http://p.sf.net/sfu/android-dev2dev
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi Heiko,

@1: Can´t really help you with that. In our case scales from the
config-script are displayed in the map-viewer without any problems.

@2: When you click on "Show map" the map automatically hides when the cursor
is outside the map. Click on the button with the arrows instead to
constantly show the map.

@3: Geonetwork receives the response for a Get-Feature-Request in XML-format
and parses this data into a table. You could alter the code that parses the
content so that only attributes of interest are shown. But this would be
quite annoying if you have many layer-categories with different attribute
sets. You would need to cover each of this cases in the code.
Another possibility is to use the templates offered by Geoserver for
displaying the FeatureInfo. In this case you would have to change the
response format to "text/html". In addition you have to change the code for
the FeatureInfo (in FeatureInfoPanel.js). This way has the advantage that
you only have to set up the look of the FeatureInfo once in GeoServer. The
disadvantage is that it´s no longer possible to separate the FeatureInfos by
layer (cause the response is only dumb text ... although theoretically you
could split this text to achieve that). Disadvantage it´s not that trivial
to alter the code to achieve that. Coding experience with Javascript is
certainly required. Anyway we chose this way on our portal.
You might have a look at our portal under this link:
http://131.220.109.2/geonetwork Volta Basin Authority Geoportal

Best regards
Max Stephan

Center for Development Research - University of Bonn
http://131.220.109.2/geonetwork Volta Basin Authority Geoportal

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-configuration-in-GN-2-6-x-tp6679658p6947852.html
Sent from the GeoNetwork users mailing list archive at Nabble.com.