A map component based on places.js for Vue 2.x
vue-places
Places component is based on places.js for Vue 2.x. Turn any input into an address autocomplete.
Installation
# yarn
$ yarn add vue-places
# npm
$ npm install vue-places --save
Example
<template>
<places
v-model="form.country.label"
placeholder="Where are we going ?"
@change="val => { form.country.data = val }"
:options="{ countries: ['US'] }">
</places>
</template>
<script>
import Places from 'vue-places'
export default {
data() {
return {
form: {
country: {
label: null,
data: {},
},
},
};
},
components: {
Places
}
}
</script>