This time I will share jQuery Plugin and tutorial about Minimal Google Place Autocomplete In jQuery – Address Suggestion, hope it will help you in programming stack.
Address Suggestion a lightweight jQuery address/place picker plugin that allows to autocomplete, search places using Google Map Geocode API.
How to use it:
1. Put jQuery library and the jQuery Address Suggestion plugin’s files in the html file.
1 |
< link rel = "stylesheet" href = "jquery.address-suggest.css" > |
2 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
3 |
< script src = "jquery.address-suggest.js" ></ script > |
2. Create the address, number, street, zip, town, department, region and country input fields for the place picker.
1 |
< input type = "text" class = "form-control" id = "number" > |
2 |
< input type = "text" class = "form-control" id = "street" > |
3 |
< input type = "text" class = "form-control" id = "zip" > |
4 |
< input type = "text" class = "form-control" id = "town" > |
5 |
< input type = "text" class = "form-control" id = "department" > |
6 |
< input type = "text" class = "form-control" id = "region" > |
7 |
< input type = "text" class = "form-control" id = "country" > |
3. Activate the address/place picker with default options.
1 |
$( "input#address" ).suggest(); |
4. All default options to customize the address/place picker.
01 |
$( "input#address" ).suggest({ |
02 |
label : "Formatted address" , |
03 |
street_number_input : { |
05 |
label : "Street number" |
This awesome jQuery plugin is developed by meyacine. For more Advanced Usages, please check the demo page or visit the official website.