Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Distance Bug #28

Merged
merged 18 commits into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- Developed by Taipei Urban Intelligence Center 2023-2024-->

<script setup>
import { computed, onMounted, ref } from "vue";

Check failure on line 4 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

'computed' is defined but never used

Check failure on line 4 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (20.x)

'computed' is defined but never used
import { useMapStore } from "../../store/mapStore";
import { useDialogStore } from "../../store/dialogStore";
import { useContentStore } from "../../store/contentStore";
import { storeToRefs } from "pinia";

Check failure on line 8 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

'storeToRefs' is defined but never used

Check failure on line 8 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (20.x)

'storeToRefs' is defined but never used
import mapboxGl from "mapbox-gl";

Check failure on line 9 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (18.x)

'mapboxGl' is defined but never used

Check failure on line 9 in Taipei-City-Dashboard-FE/src/components/map/MapContainer.vue

View workflow job for this annotation

GitHub Actions / build (20.x)

'mapboxGl' is defined but never used
import axios from "axios";

import MobileLayers from "../dialogs/MobileLayers.vue";
Expand Down Expand Up @@ -62,7 +62,7 @@

for (let hospital of hospitals) {
const { inform } = hospital.properties;
const [lat, lon] = hospital.geometry.coordinates;
const [lon, lat] = hospital.geometry.coordinates;

if (inform === "N") {
const distance = calculateDistance(userLat, userLon, lat, lon);
Expand Down Expand Up @@ -143,7 +143,6 @@
});

const showTooltip = ref(false);

</script>

<template>
Expand All @@ -163,9 +162,8 @@
color: districtLayer
? 'var(--color-highlight)'
: 'var(--color-component-background)',
marginTop: '50px',
marginTop: '50px',
}"

@click="toggleDistrictLayer"
>
Expand Down Expand Up @@ -263,20 +261,20 @@
<style scoped lang="scss">
.input {
position: absolute;
right: 20px;
bottom: 60px;
width: 70px;
height: 70px;
border-radius: 50%;
background-color: var(--color-component-background);
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s, color 0.2s;
right: 20px;
bottom: 60px;
width: 70px;
height: 70px;
border-radius: 50%;
background-color: var(--color-component-background);
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.2s, color 0.2s;
font-size: 32px;
&:hover {
background-color: var(--color-highlight);
}
&:hover {
background-color: var(--color-highlight);
}
.icon {
color: white;
font-family: var(--font-icon);
Expand Down Expand Up @@ -305,7 +303,6 @@
margin-left: -5px;
border-color: black transparent transparent transparent;
}

}
.mapcontainer {
position: relative;
Expand Down
Loading