You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if we can default the "crop" to the continent you are most likely to be on, the zoomed in view you'll see is likely also going to be the one you have a realistic chance of going to. I.e. if I'm in North America, I see adjacent events, etc. WordPress/wp20.wordpress.net#54 (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 using api.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. When using the map on wordpress.org/wordcamp.org, we should be able to access ip2location.
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: