@@ -66,8 +65,6 @@ const totalTime = computed(() => {
- {{ insertPosition }} {{ flightPlan.track.length }}
-
diff --git a/src/components/map/AirspaceInfoWindow.vue b/src/components/map/AirspaceInfoWindow.vue
index d303d34..edf1651 100644
--- a/src/components/map/AirspaceInfoWindow.vue
+++ b/src/components/map/AirspaceInfoWindow.vue
@@ -16,6 +16,11 @@ const props = defineProps({
required: false,
default: () => []
},
+ isInTrack: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
showActions: {
type: Boolean,
required: false,
@@ -34,7 +39,7 @@ watch(() => props.infoWindow.position, async () => {
if (props.infoWindow.title) {
title.value = props.infoWindow.title
} else {
- title.value = await searchPlaceName(props.infoWindow.position.lat, props.infoWindow.position.lng);
+ searchPlaceName(props.infoWindow.position.lat, props.infoWindow.position.lng).then(data => title.value = data);
}
}, {immediate: true, deep: true});
@@ -55,8 +60,8 @@ const addPoint = () => {
emits("close");
}
-const removePoint = (marker) => {
- emits("remove-from-route", marker);
+const removePoint = () => {
+ emits("remove-from-route", props.infoWindow);
emits("close");
}
@@ -132,17 +137,15 @@ const openedTab = ref("info");
-
-
-
-
- {{ infoWindow.marker.name }}
-
+
+
+ {{ infoWindow.marker.name }}
+
@@ -183,16 +186,15 @@ const openedTab = ref("info");
Odebrat z trasy
diff --git a/src/components/map/MapWrapper.vue b/src/components/map/MapWrapper.vue
index bfbc205..08476c8 100644
--- a/src/components/map/MapWrapper.vue
+++ b/src/components/map/MapWrapper.vue
@@ -1,10 +1,11 @@
@@ -193,6 +244,7 @@ const handleAirportClick = (airport) => {
:street-view-control="false"
@click="handleMapClick"
map-type-id="roadmap"
+ gesture-handling="greedy"
:max-zoom="13"
ref="mapRef"
>
@@ -201,6 +253,7 @@ const handleAirportClick = (airport) => {
:info-window="infoWindow"
:show-actions="allowAddMarker"
:highlighted-airspaces="highlightedAirspaces"
+ :is-in-track="isDetailInTrack"
@close="infoWindow.active=false"
@add-to-route="emits('add-to-route', $event)"
@remove-from-route="emits('remove-from-route', $event)"
@@ -218,37 +271,78 @@ const handleAirportClick = (airport) => {
:options="{position: {lat: airport.gpsLatitude, lng: airport.gpsLongitude}, anchorPoint: 'CENTER'}"
@click.stop="handleAirportClick(airport)"
>
- {{ airport.icaoCode }}
+
-
+
-
+ ▲
+
+
+
+
+

+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
diff --git a/src/composables/airspaces.js b/src/composables/airspaces.js
index 361df04..4387605 100644
--- a/src/composables/airspaces.js
+++ b/src/composables/airspaces.js
@@ -18,3 +18,21 @@ export const useAirspaceColors = () => {
return {colors, getColorByType}
}
+
+
+export const useAltitudeUtils = () => {
+ const altitudeToFt = (limit, unit) => {
+ if (unit === 'FL') return parseInt(limit) * 100;
+ return parseInt(limit);
+ }
+ const altitudeLimitFormatted = (limit, unit) => {
+ if (parseInt(limit) === 0) return 'GND';
+ else if (unit === 'FL') return `FL${limit}`;
+ else {
+ if (parseInt(limit) >= 5000) return `FL${limit / 100}`;
+ return `${limit} ft`
+ }
+ }
+
+ return {altitudeLimitFormatted, altitudeToFt}
+}
diff --git a/src/composables/flightPlan.js b/src/composables/flightPlan.js
index cf5f082..ac3aeb7 100644
--- a/src/composables/flightPlan.js
+++ b/src/composables/flightPlan.js
@@ -52,7 +52,7 @@ export const useFlightPlanObjects = () => {
}
}
- const infoWindowObject = ({active, position, marker, poi, airport, reportingPoint, airspaces}) => {
+ const infoWindowObject = ({active, position, marker, poi, airport, reportingPoint, airspaces, isInTrack}) => {
if (!position) position = {};
if (!position.lat) position.lat = 0;
if (!position.lng) position.lng = 0;
@@ -83,7 +83,7 @@ export const useFlightPlanObjects = () => {
position.lng = poi.gpsLongitude;
}
- return {title, active, position, airspaces, poi, marker, airport, reportingPoint};
+ return {title, active, position, airspaces, poi, marker, airport, reportingPoint, isInTrack};
};
return {markerObject, googleMapsMarkerObject, googleMapsCustomMarkerObject, infoWindowObject, editableNameTypes}
diff --git a/src/graphql/fragments/airport.js b/src/graphql/fragments/airport.js
index 463e187..c96f32c 100644
--- a/src/graphql/fragments/airport.js
+++ b/src/graphql/fragments/airport.js
@@ -8,6 +8,7 @@ export const FRAGMENT_AIRPORT_INFO = gql`
gpsLatitude
gpsLongitude
elevation
+ iconUrl
reportingPoints {
id
gpsLatitude