Geolocation, Geocoding, and jQuery Promises
Posted by: K. Scott Allen,
on 18 Jun 2012 |
View original | Bookmarked: 0 time(s)
If you want to use the customers hardware to find their exact address, one approach is to combine the HTML 5 Geolocation APIs with a Geocoding web service (like Google). For Google, you can still get in without an API key (for a limited number of calls) using the Google Maps JavaScript library (just reference http://maps.google.com/maps/api/js in a script tag). With the library in place, the code is straightforward (particularly the following code, which doesnt have any error handling, but is...