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
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
[x] There are unit tests to verify my changes are correct
[ ] I've updated relevant documentation in doc/.
[x] I've updated CHANGES.md with what I changed.
[x] I've provided instructions in the PR description on how to test this PR.
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 onWebMapServiceCatalogItem
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:
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
doc/
.