Meio.Autocomplete.Geo is a project mainly written in JavaScript, it's free.
A MooTools plugin based on Meio.Autocomplete that autocompletes a field with Google Local Search results and allows you to retrieve latitude, longitude, city and other info from the user's selection.
Meio.Autocomplete.Geo - a MooTools plugin based on Meio.Autocomplete that autocompletes a field with Google Local Search results and allows you to retrieve latitude, longitude, city and other info from the user's selection.
First of all, you need to include all dependencies:
Then: var geocompleter = new Meio.Autocomplete.Geo('geoInput', { location: 'Paris, France' //though you could also pass a google.maps.LatLng instance });
That's it for geocompletion!
Now, if you want to know how to get latitude/longitude etc when the user selects an option, see the demo for a more complete example :)
If you want to customize anything in the autocompleter behavior, see Meio.Autocomplete.