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

[external map viewer] Add WFS to map: empty ${service.name} variable #7048

Closed
jeanpommier opened this issue May 3, 2023 · 0 comments · Fixed by #7181
Closed

[external map viewer] Add WFS to map: empty ${service.name} variable #7048

jeanpommier opened this issue May 3, 2023 · 0 comments · Fixed by #7181

Comments

@jeanpommier
Copy link
Contributor

Describe the bug
When an external map viewer is configured, the ${service.name} variable is an empty string. Consequently not adding the layer to the map.

I tracked it down to https://github.com/geonetwork/core-geonetwork/blob/main/web-ui/src/main/resources/catalog/components/metadataactions/RelatedResourcesService.js#L150 where the featureName, used just below, is resolved to ''. Is there a reason to try to localize the feature name ? It seems strange. And it is looking for link.title, which doesn't exist in my case. Shouldn't it look for link.name instead ?

To Reproduce
Steps to reproduce the behavior:

  1. Configure an external viewer string, for instance /mapstore/#/?actions=[{"type":"CATALOG:ADD_LAYERS_FROM_CATALOGS","layers":["${service.name}"],"sources":[{"type":"${service.type}","url":"${service.url}"}]}]
  2. Create a metadata with a WFS related resource
  3. Click on the Add to Map link for this resource and look at the generated URL params

Expected behavior
service.name should give the layer name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant