DEV Community

Discussion on: Troubleshooting and Adding Google Maps to individual Nuxt js pages

Collapse
 
israelortuno profile image
Israel Ortuño • Edited

Consider using this library:

github.com/googlemaps/js-api-loader

    const loader = new Loader({
      apiKey: 'XXX',
      version: 'weekly',
      libraries: ['places']
    })

    await loader.load()

    this.placesAutocomplete = new window.google.maps.places.Autocomplete(this.$refs.place)
Enter fullscreen mode Exit fullscreen mode