Vue3 component to get organized payload of Place name, city, state, country and lat-long
npm install vue3-google-autocomplete
npm install vue3-google-autocomplete
`
or
`
yarn add vue3-google-autocomplete
`
Usage
Here is the example on how to use it inside your Vue component.
`Javascript
v-model="value"
api-key="process.env.VITE_APP_GAPI_KEY"
/>
`
Here on @set event you can get your google places api payload
`Javascript
v-model="value"
api-key="process.env.VITE_APP_GAPI_KEY"
@set="getPayload($event)"
/>
`
By default you will get payload like this.
Eg.
`Javascript
{
"name": "The White House",
"city": "Washington",
"state": "District of Columbia",
"country": "United States",
"latitude": 38.8976763,
"longitude": -77.0365298
}
`
There is one prop isFullPayload which is false by default but if you pass isFullPayload: true as shown below you will get full (default) google places api payload.
Eg.
`Javascript
v-model="value"
api-key="process.env.VITE_APP_GAPI_KEY"
:isFullPayload="true"
@set="getPayload($event)"
/>
``