Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (19 sloc) 1.46 KB

Meio.Autocomplete.Geo by Matti Schneider-Ghibaudo

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.

How to use

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.