diff --git a/src/components/DestinationInfoCard.vue b/src/components/DestinationInfoCard.vue index e02e4b7..5bf3c95 100644 --- a/src/components/DestinationInfoCard.vue +++ b/src/components/DestinationInfoCard.vue @@ -344,8 +344,8 @@ export default { axios.get(`https://api.openrouteservice.org/v2/directions/wheelchair?api_key=${apiKey}&start=${startCoord}&end=${endCoord}`) .then(response => { const route = response.data.features[0].geometry.coordinates; - console.log('This is route :',{start:this.userLocation,stop:{lat:parseFloat(this.nearestStructureData.lat),lon:parseFloat(this.nearestStructureData.lon)},route:route}) - this.$emit('updateRouting', {start:this.userLocation,stop:{lat:parseFloat(this.nearestStructureData.lat),lon:parseFloat(this.nearestStructureData.lon)},route:route}); + console.log('This is route :',{route:route}) + this.$emit('updateRouting', {route:route}); // this.plotRoute(route); }) .catch(error => { diff --git a/src/views/Home.vue b/src/views/Home.vue index aecdd3c..9b2255e 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -83,21 +83,28 @@ + - - - - - - + + + + + + + + + + + + + + @@ -125,8 +132,6 @@ const rotation = ref(0); const popupData = ref(null); const isRouting = ref(false); -const startPoint = ref(null); -const stopPoint = ref(null); const route = ref(null); const strokeWidth = ref(5); const strokeColor = ref("red"); @@ -183,10 +188,7 @@ const closePopup = () => { const handleRouting = (res) => { console.log("Received Route:", res); - startPoint.value = [parseFloat(res.start.lat),parseFloat(res.start.lon)]; - stopPoint.value = [parseFloat(res.stop.lat),parseFloat(res.stop.lon)]; route.value = res.route; - // console.log(startPoint,stopPoint,route); isRouting.value = true; };