1

I use GeoNetwork 3.0.2 ... Is it possible to remove the default background map and is there a way to add a background map from GeoServer, using WMS?

2

You need to change config-viewer.xml file. You can also change default zoom and position of loaded map.

For example mine for testing looks like that, but WMS is a little weird. When I change base layer it disappear from background layers.

<ows-context:OWSContext xmlns:ows-context="http://www.opengis.net/ows-context"
                        xmlns:ows="http://www.opengis.net/ows"
                        version="0.3.1" id="ows-context-ex-1-v3">
  <ows-context:General>
    <ows:BoundingBox crs="EPSG:3857">
      <ows:LowerCorner>1531645.1727783617 5723757.552050567</ows:LowerCorner>
      <ows:UpperCorner>1822564.5024317426 5871433.890697529</ows:UpperCorner>
    </ows:BoundingBox>
  </ows-context:General>
  <ows-context:ResourceList>
    <ows-context:Layer name="{type=mapquest}"
                       group="Background layers"
                       hidden="true"
                       opacity="1">
      <ows:Title>MapQuest</ows:Title>
    </ows-context:Layer>
    <ows-context:Layer name="{type=osm}"
                       group="Background layers"
                       hidden="true"
                       opacity="1">
      <ows:Title>OpenStreetMap
      </ows:Title>
    </ows-context:Layer>
    <ows-context:Layer name="{type=wmts,name=elf_basemap}" 
                       group="Background layers" 
                       hidden="true" 
                       opacity="1"> 
      <ows:Title>ELF Basemap</ows:Title> 
      <ows-context:Server service="urn:ogc:serviceType:WMTS"> 
        <ows-context:OnlineResource xlink:href="http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts" xmlns:xlink="http://www.w3.org/1999/xlink"/> 
      </ows-context:Server> 
    </ows-context:Layer>
    <ows-context:Layer name="0" 
                       group="Background layers" 
                       hidden="false" 
                       opacity="1"> 
      <ows:Title>DOF5</ows:Title> 
      <ows-context:Server service="urn:ogc:serviceType:WMS"> 
        <ows-context:OnlineResource xlink:href="http://copernicus.discomap.eea.europa.eu/arcgis/services/GioLandPublic/EU_DEM/MapServer/WmsServer" xmlns:xlink="http://www.w3.org/1999/xlink"/> 
      </ows-context:Server> 
    </ows-context:Layer>
    <!-- <ows-context:Layer name="{type=bing_aerial}"
                       group="Background layers"
                       hidden="true"
                       opacity="1">
      <ows:Title>Bing Aerial</ows:Title>
    </ows-context:Layer> -->
  </ows-context:ResourceList>
</ows-context:OWSContext>
  • That is not valid for GeoNetwork 3+. – María Arias de Reyna Domínguez Nov 17 '15 at 7:24
  • Just wondering how is it then working for me using geonetwork 3.0.2.0? Can you provide me one valid configuration (with my data above) that works because I don't know how this json need to be formatted. – user1403588 Nov 17 '15 at 7:35
  • You are right, if you configure GeoNetwork to use ows-context, this file is useful. – María Arias de Reyna Domínguez Nov 17 '15 at 9:23
2

On the settings (geonetwork/portal/eng/admin.console#/settings/system) you can find a json string that defines the map on Map -> Configuration for maps

If that is not enough for you, you can modify the javascript files directly: http://geonetwork-opensource.org/manuals/trunk/eng/users/customizing-application/search-ui/configdefault.html#viewer-settings

Since the documentation is a little quiet on the format of the required URL, it should look like:

http://machine:port/path/to/service?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.0&LAYERS=osopen&STYLES=default&SRS={srs}&BBOX={minx},{miny},{maxx},{maxy}&WIDTH={width}&HEIGHT={height}&FORMAT=image/png
  • I still can't switch to those layers though – Ian Turton Jul 14 '16 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.