Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL de services dans métadonnées #919

Open
IGNF-Xavier opened this issue Jun 27, 2024 · 3 comments
Open

URL de services dans métadonnées #919

IGNF-Xavier opened this issue Jun 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@IGNF-Xavier
Copy link

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?

@IGNF-Xavier IGNF-Xavier added the bug Something isn't working label Jun 27, 2024
@jahow
Copy link
Collaborator

jahow commented Jun 27, 2024

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

if (mapConfig?.DO_NOT_TILE_WMS) {
return new ImageLayer({
source: new ImageWMS({
url: layerModel.url,
params: { LAYERS: layerModel.name },
attributions: layerModel.attributions,
}),
})
} else {
return new TileLayer({
source: new TileWMS({
url: layerModel.url,
params: { LAYERS: layerModel.name, TILED: true },
attributions: layerModel.attributions,
}),
})

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

@IGNF-Xavier
Copy link
Author

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
Copy link
Collaborator

jahow commented Jul 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants