mirror of
https://gitlab.com/little-lines/frontend.git
synced 2024-11-22 01:36:53 +00:00
emit data from destCard to Home
This commit is contained in:
parent
19ba190ced
commit
cea70a1d42
2 changed files with 8 additions and 1 deletions
|
@ -282,6 +282,7 @@ export default {
|
||||||
lon: position.coords.longitude
|
lon: position.coords.longitude
|
||||||
};
|
};
|
||||||
console.log('User Location:', this.userLocation);
|
console.log('User Location:', this.userLocation);
|
||||||
|
this.$emit('updateLocation', this.userLocation);
|
||||||
},
|
},
|
||||||
handleLocationError(error) {
|
handleLocationError(error) {
|
||||||
console.error('Error getting location:', error);
|
console.error('Error getting location:', error);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
v-if="popupData"
|
v-if="popupData"
|
||||||
:nearestStructureData="popupData"
|
:nearestStructureData="popupData"
|
||||||
:onClose="closePopup"
|
:onClose="closePopup"
|
||||||
|
@updateLocation="handleUserLocation"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,6 +94,7 @@ import { ref } from "vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
import DestinationInfoCard from '@/components/DestinationInfoCard.vue';
|
||||||
|
|
||||||
|
|
||||||
const center = ref([100.538611, 13.764722]);
|
const center = ref([100.538611, 13.764722]);
|
||||||
const projection = ref("EPSG:4326");
|
const projection = ref("EPSG:4326");
|
||||||
const zoom = ref(19);
|
const zoom = ref(19);
|
||||||
|
@ -151,6 +152,11 @@ const closePopup = () => {
|
||||||
popupData.value = null; // Hide popup
|
popupData.value = null; // Hide popup
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleUserLocation = (location) => {
|
||||||
|
console.log("Received user location:", location);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in a new issue