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

URL de services dans métadonnées #919

Open IGNF-Xavier opened 2 months ago

IGNF-Xavier commented 2 months ago

Describe the bug

When a user indicates the Services' URL in the medata, he can write :

In the second case, the datahub gives an URL with multiple parameters, for exemple :

https://data.geopf.fr/wms-v?SERVICE=WMS&SERVICE=WMS&VERSION=1.3.0&VERSION=1.3.0&request=GetCapabilities&REQUEST=GetMap&FORMAT=image/png&STYLES=&TRANSPARENT=true&LAYERS=OCSGE_DI_031_2022&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG:3857&BBOX=157766.02638060227,5395231.204480881,158071.77449374297,5395536.952594021

Can the datahub avoid this problem?

jahow commented 2 months ago

I could reproduce this, thanks; this is because we're using the provided URL straight away here:

https://github.com/geonetwork/geonetwork-ui/blob/fe59f1796761449dac41ed64c9bdd2cfdf312c88/libs/feature/map/src/lib/map-context/map-context.service.ts#L124-L139

instead we should ask ogc-client to generate a url to use for the layer.

IGNF-Xavier commented 1 month ago

Hello, To avoid this problem, we don't provide the getcap in the metadata. Instead of https://data.geopf.fr/wms-v/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities, we referenced https://data.geopf.fr/wms-v

But in the section API, the user can only copy https://data.geopf.fr/wms-v and not the getcapabilities when he use the api card image

I don't know what to do. Is it really a bug and i keep https://data.geopf.fr/wms-v in the metadata or not?

jahow commented 1 month ago

It is most likely a bug, yes; it can either be fixed or worked around