xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 474 forks source link

auto-complete #728

Open spectra10008 opened 4 years ago

spectra10008 commented 4 years ago

im trying to use auto-complete feature but giving me an error :-

google.maps.places is undefined

I searched for the error and it turned out that it needs google place library, but I can't enable it and get it because of the conflict because there are two calls to it

sl0wik commented 4 years ago

Solution: Use new google.maps.places.AutocompleteService(); instead of google.maps.places.AutocompleteService();

davydnorris commented 4 years ago

Make sure you have added the places library to the initialisation code:

Vue.use(VueGoogleMaps, {
  load: {
    key: <key>,
    libraries: 'places,visualization,drawing',
  }
});