-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix map snapback by cleaning up hooks #501
Conversation
Reviewing this on my phone so I'm a bit limited, but it looks like this would eliminate the map using the user's location to center the map where they are. Could you keep that functionality as a part of the fix? Users may just want to see options near them when browsing the map on their phones. It may be confusing to see city hall on the map when you're browsing from North Philly. For some more context, we use City Hall as a default first location in the event users do not want to share their location. |
Thanks for the catch @gcardonag! I wasn't sure if the geolocation feature was implemented yet. The latest commit adds that back. |
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.
A few questions/suggestions
setCurrentLat(position.coords.latitude); | ||
setCurrentLon(position.coords.longitude); | ||
} catch (error) { | ||
console.error("Error obtaining geolocation. Default coordinates will be used."); |
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 we noop this catch statement? We don't get much value from these console statements
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.
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.
Approved since the logging message has been cleaned up and the rest of the code has been reviewed ✅
Pull Request
Change Summary
Fixes the map snapping back to City Hall when browsing resources. Map will now follow user, including in the search feature.
Change Reason
Map snapping back to City Hall marks for a poor user experience when trying to browse resources on the map. It also conflicts with the panning behavior of the search functionality.
Verification [Optional]
phlask-500-480p.mov.zip
No new console errors:
Fixes #500