-
Notifications
You must be signed in to change notification settings - Fork 27
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
Geolocate user and center map #475
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To do that I think we'll need to geolocate the user from their IP, and then center the map on those coordinates. Ideally we can do that server-side without any API requests, to avoid delayed the initial map render or having to move the center after the initial render.
That rules out usingWhen using the map on wordpress.org/wordcamp.org, we should be able to accessapi.w.org/events
directly, but we could maybe use a local copy of the same geolocation database. Another approach would be using the Geolocation API in the browser.ip2location
.Since the ultimate goal is to make sure the user can see the filtered markers, it might also work to pass the coordinates of those markers to
fitBounds
.The text was updated successfully, but these errors were encountered: