fawmi / vue-google-maps

Reactive Vue 3 components for Google maps
https://vue-map.netlify.app
MIT License
197 stars 101 forks source link

Add an API to access the `google` object #88

Open aentwist opened 2 years ago

aentwist commented 2 years ago

If this is already possible then it should be added to the documentation. I did not see it after examining the source code.

See a reference Vue 2 implementation from gmap-vue.

fawmi commented 2 years ago

It is already possible to access the google object. Here is an example of accessing google in your component:

https://stackblitz.com/edit/vue-google-maps-marker-zzrfjb?file=src/components/ComponentWithMap.vue

Although this solution works, but I agree, that there should be an api for it. I will add it to the todo list.

danimalweb commented 2 years ago

+1 For this!

tylerclark commented 2 years ago

Was able to get this working in Vue 3 using Options API after seeing some Composition API examples: https://github.com/fawmi/vue-google-maps/discussions/113#discussioncomment-2517078