geonetwork / geonetwork-ui

GeoNetwork UI is a suite of Applications made to provide a modern facade to your GeoNetwork 4 catalog. It also provides Web Components to embed various parts of your data catalog in third party websites.
https://geonetwork.github.io/geonetwork-ui/main/docs/
GNU General Public License v2.0
63 stars 32 forks source link

WMTS layers #903

Open AlexanderSolovov opened 2 months ago

AlexanderSolovov commented 2 months ago

The map viewer seem to have a number of issues with WMTS layers. 1) When I publish a record with WMTS API reference, this record is not displayed in the Add layer form and cannot be searched. 2) Even if I add WMTS layer through the Services tab or by searching in the catalogue, it is not displayed in the legend. 3) If I try to save or download the map with WMTS layers, nothing happens and JavaScript console shows the error "TypeError: b.getParams is not a function"

jahow commented 2 months ago

Hello, thank you for your interest in the project!

Could you please provide a reproduction case, either the full record in XML that you're using or the WMTS URL?

Thank you!

AlexanderSolovov commented 2 months ago

As a simple case, I open the map and add WMTS layer through the Services tab using this ULR - http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts and selecting "Bakgrunnskart forenklet" layer. The console shows an error. Same error if I try to download the map. The legend is empty.

AddLayer Legend DownloadMap

AlexanderSolovov commented 2 months ago

Btw, there is probably one more bug with application/vnd.mapbox-vector-tile format. If it is available from the server, the map seem to pick it up automatically (cannot change to image/png for instance), but the layer is not displayed. After removing application/vnd.mapbox-vector-tile from available formats, the layer is displayed. Tested with local GeoServer.

jahow commented 2 months ago

It looks like you're using the legacy GeoNetwork frontend, which is hosted here: https://github.com/geonetwork/core-geonetwork. This repo is for GeoNetwork-UI which is a more modern frontend.

Could you please recreate your bug report there so that it can be looked at appropriately? Thanks!

AlexanderSolovov commented 2 months ago

I see. I wanted to try demo (https://geonetwork.github.io/geonetwork-ui/main/demo/webcomponents/gn-map-viewer.sample.html) but it doesn't work.

Should I report then to core-geonetwork? Can it be fixed there?

jahow commented 2 months ago

This application is indeed provided by GeoNetwork-UI. The screenshots that you included earlier were not.

Let's keep this bug opened and try to fix it here then :)

jahow commented 2 months ago

In the Datahub a record with this WMTS will render correctly; I did that locally and here is what was shown:

image

AlexanderSolovov commented 2 months ago

Yes, the layer is rendered on the map (unless it is vnd.mapbox-vector-tile format). The issues were saving a map with WMTS layers, searching it and showing a legend. Not sure if it is applicable to the new UI apps.

jahow commented 2 months ago

I think this is an issue to report on https://github.com/geonetwork/core-geonetwork indeed, if that's what you are using.