This is a reverse geocoding demo that uses your current location to provide you with a JSON output of information about your current position. Powered by Geocod.io.
Good location data can make a huge impact on the quality of your application's user experiance. The problem is a good source of location data is hard to find and users often provide incomplete and missing data.
Using Geocod.io to make a reverse geocoding request we can resolve more location infomation from a limited amount of data.
This lets you correct incomplete infomation and ensure you have a correct and valid address.
With complete location information you can do things like:
- Ensure that physical mailings reach your users.
- Reduce returned packages and missed deliveries.
- Improve QoS on food delivery services.
- Ensure legal compliances.
First the user is asked for permission to get their current location.
Then a request is made to the Geocod.io Reverse Geocoding API with the users position:
https://api.geocod.io/v1.4/reverse?q=X,Y&api_key=YOUR_API_KEY
Results of the request are displayed under the page instructions.
What are you waiting for? Try the Demo
Sign up for a Geocod.io account. Get your API key from the dashboard.
Fork/clone this repo and edit scripts.js. Replace my API key with your API key:
var geocodio_API_KEY = "b67b8419e9b6e105e6659e191e5e16104eee640"; // Get your API key https://dash.geocod.io/
Enable GitHub pages on the master branch.
Visit your site and give it a try.
Learn more from the Geocode.io Docs.