Skip to content
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

improve geolocation's shouldStopTrackingLocation #425

Closed
wbazant opened this issue Jul 13, 2024 · 3 comments
Closed

improve geolocation's shouldStopTrackingLocation #425

wbazant opened this issue Jul 13, 2024 · 3 comments
Labels
enhancement New feature request

Comments

@wbazant
Copy link
Collaborator

wbazant commented Jul 13, 2024

I thought I just broke this, but the beta site also has the issue - you can zoom out quite far, and still have the dot:

Screenshot from 2024-07-13 12-14-13

  • switch off geolocation when map is zoomed out past a threshold
  • switch off geolocation when it is on, and the crosshair symbol is on

when coming back to the place textbox after it had input, re-open suggestions. I searched Birmingham, zoomed in, and wanted to come back to the view of the city. Clicking on the text box doesn't do anything:
Screenshot from 2024-07-13 12-17-20 and I get suggestions back only after I type a space.
(moved to #426)

@ezwelty
Copy link
Collaborator

ezwelty commented Aug 16, 2024

switch off geolocation when it is on, and the crosshair symbol is on

@wbazant By "crosshair symbol is on", do you mean when the user uses the place search box to select a place to navigate to? I would tie the logic rather to this action, because we may or may not always wish to display a crosshair (see my comment regarding approximate places #419 (comment)). Anyway, I think it makes sense to stop tracking location in this case.

switch off geolocation when map is zoomed out past a threshold

I don't see this as necessarily always a good thing (could be useful sometime to see one's location in context?), but if we went this way, we could use the max cluster zoom level as the threshold.

@ezwelty ezwelty added the enhancement New feature request label Aug 16, 2024
@wbazant
Copy link
Collaborator Author

wbazant commented Aug 16, 2024

I meant the place selection, rather than the place crosshair being on the map, you're right!

Now that I come back to this issue, I think the original heuristics for stopping geolocation, or my proposed ones, don't make sense. There's no reason why selecting a place or zooming out should switch geolocation off. Maybe a better resolution would be to base the behaviour on whether the geolocation dot is inside the map bounds after the view change. If we zoom into a region without the geolocation, or select a place outside the map, tracking should be switched off (there's no more need to track the dot's whereabouts after the user did something that loses it) but zooming out never loses the dot, and searching may or may not lose it.

@wbazant
Copy link
Collaborator Author

wbazant commented Nov 4, 2024

Closed in favour of #518

@wbazant wbazant closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request
Projects
None yet
Development

No branches or pull requests

2 participants