methods: {
login() {
this.$auth.login({
params: {
email: this.email,
password: this.password
},
success: () => {
// handle redirection
const redirectTo = this.$auth.redirect()
? this.$auth.redirect().from.name
: this.$auth.user().role === 2
? 'admin.dashboard'
: 'dashboard'
this.$router.push({name: redirectTo})
},
error: error => {
this.has_error = true
this.errors = error.response.data.errors || {}
this.error = error.response.data.error
},
rememberMe: this.remember_me,
fetchUser: true
})
},
........
}
const marker = new google.maps.Marker({
map: this.map,
title: place.name,
position: place.geometry.location,
});
google.maps.event.addListener(marker, 'click', () => {
this.infowindow.setContent(marker.title);
this.infowindow.open(this.map, marker);
});
this.markers.push(marker);
updateMap() {
if (this.polyline) {
this.polyline.setMap(null);
}
this.polyline = new google.maps.Polyline({
path: this.markers.map(n => n.getPosition()),
geodesic: true,
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 2,
map: this.map,
});
},
document.getElementById('map') <...> document.getElementById('inputPlace')