Vue component that manages the complexity of auto-suggesting a zipcode with google maps
npm install vue-google-maps-zipcode-inputThis component provides an easy way to handle google maps zipcode autocompletion wih Vue. Due to various restrictions on the Google Maps Platform, reverse geocoding may be required to end up with an actual zipcode, which this component handles.
!demo
The Demo.vue provides an example integration of this component.
This component uses slots so you can provide your own input. The only requirement is to add ref="autocomplete" on the input element.
``html
`
`javascript
import Zipcode from './Zipcode.vue';
export default {
methods: {
zipcodeSelected(location) {
console.log(location);
},
},
components: {
Zipcode,
}
}
`
* country can be used to restrict the suggestions scope
* selected`