Integrating Google Maps in vue.js

后端 未结 6 1231
情书的邮戳
情书的邮戳 2020-12-08 15:24

I\'ve been trying to initialize a Google map on my vue.js project while including the script :



        
6条回答
  •  一整个雨季
    2020-12-08 15:42

    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

    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:

    
    
    
    
    

提交回复
热议问题