Simple jQuery for Google Maps autocomplete
This widget creates an autocomplete using with Google maps API:
$.widget('autocomplete.location', {
options: {
types: ['(cities)']
},
_create: function() {
this.autocomplete = new google.maps.places.Autocomplete(this.element.get(0), this.options);
}
});
Usage:
$('#cities_input').location();
Written by Felipe Elias Philipp
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#