geo-autocomplete is a jQuery extension I wrote to convert any input field on a web page into an autocomplete field that suggests locations in real-time as you type. It’s like Google Instant for your Maps.
A thumbnail of each suggested location is also presented, using the Google Static Maps API v2, to help you quickly choose the right location.
The feedback from sites using geo-autocomplete has been really positive. It has been used as a solution for users to check the spelling of foreign locations, and also as a solution to quickly re-locate a map, as seen on GeoMeme.
Since I wrote the first version of geo-autocomplete, about a year ago, there have been a few feature requests, and some developments in jQuery and the Google APIs that can be taken advantage of, so it’s time for an upgrade.
Here’s the code, and you can play with some examples below. Start by typing location names into the input fields:
1. Basic use case; check the spelling of a location
2. Fast map re-location
3. Restricted to Country Names within Africa