Skip to content

Ability to use custom WMS/WMTS layers inside app #2269

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

Merged
merged 55 commits into from
Apr 24, 2025

Conversation

ptbrowne
Copy link
Collaborator

@ptbrowne ptbrowne commented Apr 23, 2025

This PR uses the custom WMTS chooser that was previously done only in Storybook and integrate it into the app.

How to test

  1. Open Photovoltaik
  2. Switch to map
  3. Click "Map display" inside chart options
  4. Click Add layer
  5. It is possible to choose a WMS/WMTS server, see the layers displayed as a tree
  6. Select a layer / deselect it, it should appear on the map
  7. When going back, you can see the added layers, reorder them, deselect them

TODO

  • Some layers do not display, I do not know yet if it's because some servers do not send CORS or if it's a bug on our side
  • Sometimes "Unknown layers" is shown

Copy link

vercel bot commented Apr 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 24, 2025 1:13pm

@ptbrowne ptbrowne force-pushed the feat/custom-wmts-layers-2 branch from 63d7a6a to 6ea3cc4 Compare April 24, 2025 10:36
Base automatically changed from feat/custom-wmts-layers-1 to main April 24, 2025 11:09
@ptbrowne
Copy link
Collaborator Author

Thanks for your comments @bprusinowski , all very useful. I have solved the majority of them.

I think now that we have this foundation for custom layers, I will potentially port the code from https://github.com/geoadmin/web-mapviewer/blob/b32e10b678a00fd5e9df79ba1f98b32fd6684f01/packages/mapviewer/src/api/layers/WMSCapabilitiesParser.class.js#L48 since it tries to handle more cases than the default WMS/WMTS parsers. I can do that this afternoon to see if it unblocks more providers.

I would still like to merge this PR since it brings the new UI and already some providers are working. What do you think ?

@bprusinowski
Copy link
Collaborator

Of course, sounds like a good approach 💯

@ptbrowne ptbrowne merged commit 42b82da into main Apr 24, 2025
5 checks passed
@ptbrowne ptbrowne deleted the feat/custom-wmts-layers-2 branch April 24, 2025 13:07
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.

3 participants