Tuesday, 9 January 2018

Error when adding WMS layer to GeoNetwork Map


I am setting up local stack of pgadmin4 (v2), geoserver (2.12.1) and geonetwork (3.4)(on tomcat 9).


I've been testing to see if the layers i've uploaded to pgadmin and added to geoserver work, and they do. I can easily add them as a wms service with QGIS.


However, I am trying to add them also to map of geonetwork, and it doesn't seem to work. No matter which layer I use, it won't work. Even other WMS services that I know work.


I get this error:



error message



Something went wrong while loading tile 'http://localhost:8080/geoserve ...' for layer 'river_ciliwung[3857]'.



Very strange, because geonetork is able to do a WMSrequest GetCapabilities no problem.


See picture, it retrieves all the layers:


get capabilities request


furthermore, I used chrome (f12) to inspect the requests, and this is also very strange. GeoNetwork does a bunch of requests and they all get canceled.


enter image description here


How do I add a wms map layer to the geonetwork map?




Answer



Login as an admin, go to the admin console -> Settings -> User interface tab and uncheck the box Export map as image ( http://example.com/geonetwork/srv/eng/admin.console#/settings/ui).


Export map as image option disabled This will make GN use the classic for rendering the map instead of using a element that is blocked by the browser if the WMS images don't come with the right Access-Control-Allow-Origin header to enable CORS.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...