MadimetjaShika / vuetify-google-autocomplete

A Vuetify ready Vue.js autosuggest component for the Google Places API.
https://madimetjashika.github.io/vuetify-google-autocomplete/
MIT License
97 stars 53 forks source link

Fixes #60 #109

Closed toddb closed 4 years ago

toddb commented 4 years ago
toddb commented 4 years ago

Fixes #60

For use with vue2-google-maps

import Vue from 'vue';
import * as VueGoogleMaps from 'vue2-google-maps';
import VuetifyGoogleAutocomplete from 'vuetify-google-autocomplete';

// @see https://www.npmjs.com/package/vue2-google-maps
Vue.use(VueGoogleMaps, {
    load: {
        key: 'xxxxxxxxs',
        // This is required to use the Autocomplete plugin
        libraries: 'places', // 'places,drawing,visualization'
    },
});

Vue.use(VuetifyGoogleAutocomplete, {
    /*
      not used as loaded with component
      apiKey: key,
    */
    vueGoogleMapsCompatibility: true,
});
MadimetjaShika commented 4 years ago

Thanks for this @toddb, will publish a new version shortly