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

Show user's location #56

Open
bluss opened this issue Sep 12, 2020 · 1 comment
Open

Show user's location #56

bluss opened this issue Sep 12, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@bluss
Copy link

bluss commented Sep 12, 2020

When using the map in the field, it's useful for many users to show the user's current location on the map (you know with a blue dot or similar).

Nice job on the service and the site.

@rotsee
Copy link
Collaborator

rotsee commented Sep 15, 2020

Agreed. Just a few things to keep in mind:

  • We only want to show the location if the geolocating is fairly accurate
  • Should we only enable this on handheld devices? (desktop geolocating is often very approximate anway)
  • Getting the position is typically a two-step process: An approximate reading is quick (that's what we use now, on loading the map), then it can take seconds (or minutes in extreme cases) to get a more exact reading. This means that re-centering the map on the second reading is potentially disruptive. My suggestion: Only show the user's location if geolocating is manually triggered. The icon could even be used to toggle geolocation polling.
  • Constantly polling for a position is battery intensive, and another reason to make it possible to toggle this behaviour.
  • Using a shaded circle that indicates the exactness could be useful, and also make the re-adjusting of the map more transparent and less disruptive. (Like we did on the old version of Fruktkartan)
  • Should we indicate direction?
  • While the geolocation api is straightforward enough, there are a lot of different ways clients handle permissions etc, making it a bit hard to interpret all the possible error messages when a request times out, etc. TL;DR: If we want a Google Maps like functionality, actually being able to follow the user around, implementation will get more complex if we want to get everything right. Might be worth looking for a library/Leaflet plugin to handle this for us?

@rotsee rotsee added the enhancement New feature or request label Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants