mirror of
https://gitlab.com/little-lines/frontend.git
synced 2024-11-24 12:06:52 +00:00
toggle destination card and move when click location on search bar list
This commit is contained in:
parent
9cff6bd7ec
commit
58fcf52cd4
2 changed files with 39 additions and 0 deletions
38
src/components/NavigationMapCard.vue
Normal file
38
src/components/NavigationMapCard.vue
Normal file
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<v-card
|
||||
class="stick-bottom card-height"
|
||||
width="100%"
|
||||
height="60vh"
|
||||
style="padding-top: 15px; font-weight:bold;"
|
||||
:title="nearestStructureData.display_name"
|
||||
:subtitle="destination.subTitle"
|
||||
>
|
||||
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
nearestStructureData: Object,
|
||||
onClose: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showPopup: true,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
closePopup() {
|
||||
this.showPopup = false;
|
||||
this.onClose();
|
||||
},
|
||||
|
||||
viewRoute() {
|
||||
this.$emit('changeComponent', { userLocation: this.userLocation, destination: this.destination });
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -121,6 +121,7 @@ const moveToLocation = (result) => {
|
|||
const lon = parseFloat(result.lon);
|
||||
center.value = [lon, lat];
|
||||
showSearchBar.value = false;
|
||||
popupData.value = result; // Set the selected search result as popupData
|
||||
};
|
||||
|
||||
const performSearch = async () => {
|
||||
|
|
Loading…
Reference in a new issue