LIVE PREVIEWBUY FOR $7

This plugin generates an autocomplet from an enter discipline, so as to retrieve an handle and its related geodata from Google and fill it into enter fields.

Initialize

Embody libraries

<script src="https://maps.googleapis.com/maps/api/js?key=<robust>YOUR_API_KEY</robust>&libraries=locations"></script>
<script src="jquery.js"></script>
<script src="google-geocomplete.js"></script>

Create your Autocomplete Enter discipline

<enter class="form-control" id="formatted_address" data-geo="formatted_address" worth="">

Setup your fields, you need to use kind=”hidden” too

<enter class="form-control" id="avenue" <b>data-geo="avenue"</b> title="" worth="">
<enter class="form-control" id="latitude" <b>data-geo="latitude"</b> title="" worth="">
<enter class="form-control" id="longitude" <b>data-geo="longitude"</b> title="" worth="">

Name the plugin

<script>
    $(perform() {
        $('.autocomplete').googleGeoAutocomplete({
            OPTIONS
        });
    });
</script>


Source