feat: support URL parameters for layer presets and visibility (#1530) - #1563
Open
AlistairHeus wants to merge 3 commits into
Open
feat: support URL parameters for layer presets and visibility (#1530)#1563AlistairHeus wants to merge 3 commits into
AlistairHeus wants to merge 3 commits into
Conversation
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Azgaar
self-requested a review
August 7, 2026 11:22
Azgaar
reviewed
Aug 7, 2026
Owner
|
Hello and thanks for the contribution! It looks good overall. |
Pass shared searchParams into applyURLLayers and shorten URL keys to preset and layers per maintainer review.
Contributor
Author
|
Hi @Azgaar , Not sure if I've done something incorrectly here. There's a playwright test that is failing only on the CI |
Owner
|
That's ok, no worries. I will merge this later, need to complete other tasks first. As you see we have a lot of PRs noways. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds support for loading layer presets or specific lists of visible layers via URL parameters on load (#1530).
Parameters
preset: applies a preset on load (e.g., ?preset=Religions Map).Matches keys case-insensitively or by display name.
layers: toggles only the listed layers on and hides the rest (e.g., ?layers=provinces,borders,lakes,rivers).Matches against element IDs (with or without the "toggle" prefix) and display text.
Changes
Added
applyURLLayers(params)in public/modules/ui/layers.js to parse the URL parameters and toggle the layer buttons.Called
applyURLLayers(params)fromfocusOn()in public/main.js , and layers are updated once map generation or data loading completes