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

support custom URL parameters in a GetLegendGraphic request for a layer without a style configured #7263

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

sidneygijzen
Copy link
Contributor

@sidneygijzen sidneygijzen commented Aug 28, 2024

What this PR does

Fixes #7198

This PR addresses aforementioned issue by reusing an existing constant QUERY_PARAMETERS_TO_REMOVE to create a base URL for a legendGraphic request. I've added a new getter on WebMapServiceCatalogItem so the getter can be reused in the future.

Test me

A unit test is added to test this behaviour. The new test was failing before I applied the proposed change.

Manual testing:

The 'before' situation can be viewed with this ci.terria.io link. If one:

  • clicks 'explore map data'
  • selects 'test' and then 'af250m_nutrient dataset and
  • adds map layer 'Africa SoilGrids nutrients - Extractable Aluminium (Al)'

After adding the layer, the legendGraphic fails to load in the 'before' situation.

This gist can be used in testing the 'after' situation. When adding aforementioned layer, the legend graphic should be visible. I've tried to prepare an 'after' test by using ci.terria.io, but I think I can only use this method with branches existing on the official terriajs repo? If not, I would love to know how to create a ci.terria.io link with a branch from a forked repo.

Checklist

  • There are unit tests to verify my changes are correct
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@sidneygijzen sidneygijzen marked this pull request as ready for review August 28, 2024 16:13
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2024

CLA assistant check
All committers have signed the CLA.

@pvgenuchten
Copy link

hi terria team, any guidance how we can advance this PR in direction of integration?

@zoran995 zoran995 requested a review from na9da January 19, 2025 17:35
@na9da na9da self-assigned this Jan 19, 2025
Copy link
Collaborator

@na9da na9da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sidneygijzen, looks great - I have tested the change locally and it is working as expected.

Thanks for the contribution. Could you add yourselves to CONTRIBUTORS.md please?

@sidneygijzen
Copy link
Contributor Author

@na9da you're welcome. Thank you for the review!

I've added my name to the contributors file.

@na9da
Copy link
Collaborator

na9da commented Jan 21, 2025

Thanks @sidneygijzen!

@na9da na9da merged commit 881fc49 into TerriaJS:main Jan 21, 2025
6 checks passed
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 this pull request may close these issues.

wms getlegendgraphic does not include custom parameters
4 participants