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

Adjust center of the map based on the user #55

Closed
1 of 4 tasks
archived-m opened this issue Jul 12, 2020 · 1 comment · Fixed by #164
Closed
1 of 4 tasks

Adjust center of the map based on the user #55

archived-m opened this issue Jul 12, 2020 · 1 comment · Fixed by #164

Comments

@archived-m
Copy link
Contributor

archived-m commented Jul 12, 2020

Right now, the center of the map on page load is always a hardcoded latitude and longitude, the center of Belgium.

I propose we do the following:

  • If a user has a garden, set its location as the map's center
  • We can make a geolocation request using user IP (https://geolocation-db.com/json/) to get someone's approximate location
  • If the request fails or is blocked and the user is logged in, we can default to the country they provide on registration
  • We can ask for the user's location, but I'd find that annoying. I'd default to Belgium if all else fails.

This makes it so that we can increase the zoom level a little, since right now you see a lot you probably don't want to when you first load the page.

This is also the only missing (technical) thing that is preventing widespread use outside of Belgium.

@wardbeyens
Copy link
Member

We ask for the user's location if they give us permission, we center the map otherwise it defaults to Belgium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants