This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.autocomplete.addListener('place_changed', () => { | |
let place = this.autocomplete.getPlace(); | |
let ac = place.address_components; | |
let lat = place.geometry.location.lat(); | |
let lon = place.geometry.location.lng(); | |
let city = ac[0]["short_name"]; | |
console.log(`The user picked ${city} with the coordinates ${lat}, ${lon}`); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
mounted() { | |
this.autocomplete = new google.maps.places.Autocomplete( | |
(this.$refs.autocomplete), | |
{types: ['geocode']} | |
); | |
} | |
} | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input type="file" multiple accept="image/jpeg" @change="detectFiles($event.target.files)"> | |
<div class="progress-bar" :style="{ width: progressUpload + '%'}">{{ progressUpload }}%</div> | |
</div> | |
</template> | |
<script> |