-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
feat: enable user to share a link to the map that will open a drawer at a specific area id #1210
base: develop
Are you sure you want to change the base?
Conversation
…dd defauilt camera position
@vnugent i think this PR is about complete. I made sure I am up to date with develop. This required some refactoring of existing camera params, which i've combined into a single useUrlParams in order to deal with the url in a single place. In addition, I've removed the debouncing that was happening for the camera movement, and instead change the url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made some inline comments. It's great that you refactor the hooks to its own file. Not high priority (if you can do it in follow up PR) is to clear areaId
when the user clicks elsewhere on the map (currently we close the drawer, clearing the current selected area). I think this behavior is consistent with other popular maps.
|
||
const setActiveFeatureVisual = (feature: ActiveFeature | null, fState: FeatureState): void => { | ||
if (feature == null || mapInstance == null) return | ||
if (feature === null || mapInstance === null) return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change triple ===
to double catch both null and undefined? (there are several instances). Other than that I'm good to merge.
name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: ''
What type of PR is this?(check all applicable)
Description
Previously we did not have a way to share a specific area id in the map view. This PR adds whichever area is currently active in the drawer into the the url. This enables the user to either click share on the url, or click a share button in the drawer which accomplishes the same thing.
Related Issues
Issue #1209
What this PR achieves
Screenshots, recordings
Notes
In the future, I'd like to extend this to also the climb id, where the page will open with the relevant area drawer open, and the climb highlighted.