Add docs folder

This commit is contained in:
Fawad Mirzad
2021-09-13 15:30:46 +02:00
parent db827d7607
commit 86f25061de
28 changed files with 1302 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
# Autocomplete
[[toc]]
## Load Google maps places
Before using Autocomplete, you should load the places library.
```vue{5}
createApp(App)
.use(VueGoogleMaps, {
load: {
key: "",
libraries: "places"
}
})
.mount("#app");
</script>
```
## Add autocomplete to your components
You can add autocomplete to your maps using GMapAutocomplete component.
```vue
<template>
<GMapAutocomplete
placeholder="This is a placeholder"
@place_changed="setPlace"
>
</GMapAutocomplete>
</template>
<script>
export default {
name: 'App',
data() {
return {
}
},
methods: {
setPlace() {
}
}
}
</script>
```
## Custom options
You can pass google maps auto complete options using options prop
```vue{9}
<template>
<GMapAutocomplete
placeholder="This is a placeholder"
:options="{
bounds: {north: 1.4, south: 1.2, east: 104, west: 102},
strictBounds: true
}"
/>
</template>
```