I\'ve been trying to initialize a Google map on my vue.js project while including the script :
It's a little fussy to get this working without using a library, and there are probably cleaner ways, but you can simply import the library and use it in your components if you want to get up and running.
First, don't use the defer
& async
options in the tag. Load it in the
index.html
:
Then in your component you can access the global google
and pass it an element once the component is setup. For example using the setup from the Vuejs cli:
{{ msg }}