-
-
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
Panning after opening modal pans map to last location #527
Comments
Also, when modal is opened and then closed, and then near me button is clicked, no pan. |
Hey. Just started by trying to reproduce the stated issues. There are a few notable points. Here are the findings:
Note also that at the moment, I believe current location would be the default current location (around city hall I believe) when location services are off. |
Hi. I'm leaving some of my testing notes here, which organizes the various cases, in case someone else finds it helpful in debugging.
|
This fixes the issue where opening a site, then clicking "Near Me", then closing the info modal was panning back to the prior site, whereas it should have stayed at the "Near Me" site. This is "issue C" as discussed in the comments of GitHub issue #527.
Proposed fix for the issues here is provided in PR #539. |
These are awesome notes, thanks for putting them together @ravicodelabs ! I'm looking through the scenarios and PR 👀 As for the note about the default location being city hall when users do not share location, that is accurate. We set that in order to have a starting position in that scenario (since we otherwise don't have a place to set as the initial map center) |
Sounds good @gcardonag, and thanks for clarifying the default center was an intentional bit, makes sense! |
* Set user location after location fetch * Newer action syntax for user location, map center * Correct info window class on open * Remove old, commented out action syntax * Fixes a map panning issue from issue #527 This fixes the issue where opening a site, then clicking "Near Me", then closing the info modal was panning back to the prior site, whereas it should have stayed at the "Near Me" site. This is "issue C" as discussed in the comments of GitHub issue #527. * Rename redux state mapCenter to lastResourcePan The name change reflects the fact that currently as a user may have panned around the map by clicking and dragging the map, the `mapCenter` state was not updated. Instead, the state is updated when e.g. a pin is clicked, or the "Near Me" button is clicked. * Remove debugging statement * Restore original "Near Me" behavior after fix * Add some documentation comments * Simplify action - setSelectedPlace Removed unnecessary if-else condition from the reducer, and transitioned to the `createAction` syntax. * Remove temp port change for dev * Small bit of cleanup ahead of merging --------- Co-authored-by: Gabriel Cardona <2278918+gcardonag@users.noreply.github.com>
Describe the bug
In desktop mode (and presumably mobile too) the map will pan to the last location visited specifically after opening the modal and not closing it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the map to pan to the new location, e.g. Franklin D. Roosevelt Park.
The text was updated successfully, but these errors were encountered: