fix(map): sync layer toggles to URL for shareable links#621
Merged
Conversation
Layer toggles were not updating the browser URL, so shared links would not carry the user's current layer state. Extracted the debounced URL sync to a reusable class method and call it on every layer change.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
koala73
added a commit
that referenced
this pull request
Mar 1, 2026
matthewvecchione1-ops
pushed a commit
to matthewvecchione1-ops/worldmonitor
that referenced
this pull request
Mar 4, 2026
…koala73#621) Layer toggles were not updating the browser URL, so shared links would not carry the user's current layer state. Extracted the debounced URL sync to a reusable class method and call it on every layer change.
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.
Closes #576
Summary
setupUrlStateSyncto a reusable class method (debouncedUrlSync)setupMapLayerHandlerson every layer changeWhat was broken
setupUrlStateSync()only listened tomap.onStateChanged()(zoom/pan/view). Layer toggles saved to localStorage and tracked analytics but never updated the URL. Copying a link after toggling layers would share stale layer state.Test plan
layers=param updates in browser address bar