hwstartup / TheMakerMap.com

Hosting the TheMakerMap.com Static Site
MIT License
48 stars 52 forks source link

Use the HTML5 geolocation API to center the map. #18

Open bobthecow opened 11 years ago

bobthecow commented 11 years ago

... has been implemented :)

This might seem a bit intrusive upon first entering the site, but it's definitely super useful.

As part of the #16 design, it looks like there's a "locate me" button. Do we want to not auto-center the map, but wait for them to click? We definitely want to toggle the presence of the "locate me" button based on availability of the geolocation APIs.

Thoughts @ScottBlew @thisandagain?

bobthecow commented 11 years ago

If there's an available jsonp IP address geocoder service, it might make sense to ping something like that first, to get an approximate center, then request access to the geolocation API when they click "locate me"

ScottBlew commented 11 years ago

@bobthecow i think location prompt ok. It's better than zooming out and panning to your city. I also agree with toggling the "locate me" button visibility. If the user opts in the arrow will highlight blue conversely if they opt out it will remain grey. They can click on it any time to prompt geolocation.

thoughts?