Home / JavaScript / Google Geocomplete (Miscellaneous)

Google Geocomplete (Miscellaneous)

This plugin generates an autocomplet from an enter subject, with the intention to retrieve an handle and its related geodata from Google and fill it into enter fields.

Initialize

Embrace 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 subject

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

Setup your fields, you should utilize kind=”hidden” too

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

Name the plugin

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

Best Price| | Preview

Source Link

Pace loading

Worth


Your Ranking:
3.8
( 1 votes)



About puturos