Test jineho vycitani z gpx

This commit is contained in:
Michal Kváček
2023-08-28 06:35:20 +02:00
parent dcc3230cbe
commit 06764904b4
2 changed files with 25 additions and 4 deletions
+13 -3
View File
@@ -1,7 +1,7 @@
<script setup>
import {flight} from "src/composables/objects/flight";
import MapWithMarkers from "components/map/MapWithMarkers.vue";
import {computed} from "vue";
import {computed, ref} from "vue";
const props = defineProps({
flight: {
@@ -15,13 +15,16 @@ const trackWithGPS = computed(() => {
return flight.value.track.filter(poi => poi.pointOfInterest.gpsLatitude && poi.pointOfInterest.gpsLongitude)
});
const slider = ref(0);
const pointsOfInterests = computed(() => {
const path = [{
label: flight.value.takeoffAirport.name,
position:
{
lat: flight.value.takeoffAirport.gpsLatitude,
lng: flight.value.takeoffAirport.gpsLongitude
lat: flight.value.takeoffAirport.gpsLatitude + (slider.value / 1000),
lng: flight.value.takeoffAirport.gpsLongitude + (slider.value / 1000)
}
}];
@@ -56,6 +59,7 @@ const displayMap = computed(() => {
flight.value.landingAirport.id !== flight.value.takeoffAirport.id
)
});
</script>
<template>
@@ -66,4 +70,10 @@ const displayMap = computed(() => {
:markers="pointsOfInterests"
:photos="mapPhotos"
/>
{{ pointsOfInterests }}
{{ slider }}
<q-slider v-model.number="slider" :min="-100" :max="100" />
</template>