vue-google-maps
vue-google-maps copied to clipboard
Transform a component in Autocomplete
First of all, thanks for your dedication, it is helping a lot!
Is your feature request related to a problem? Please describe. I want to transform a text field in an autocomplete field. To add more context, I'm using Vuetify so I want my field to have all their style, props etc. Maybe I'm losing something here, but the best way to do that right now seems to be like the default approach to create an autocomplete field with Javascript:
onMounted(() => {
new google.maps.places.Autocomplete(
document.findElementById("my-text-field"),
...
)
})
if thats the case, is there a way to access google.maps
with script setup
without adding <script>
to index.html
?
Describe the solution you'd like
Maybe we could make GMapAutocomplete
receive childrens so we could use v-text-field
inside? Or even a v-autocomplete
?
Describe alternatives you've considered
Using google.maps
in script setup
is possible with <script>
import, but if we it with vue-google-maps
we get an alert that we're importing maps twice. Fixing this might be the best start to make us be able to use the default maps and vue-google-maps
together.
I created PR hope that it will be accepted soon https://github.com/fawmi/vue-google-maps/pull/158
I created PR hope that it will be accepted soon #158
Thanks for your time with this! I really hope as well, we were in a discussion about this repo since it seems its not maintained anymore...