From db3379ee01244e5d4649b8c8f8f869db4ce90e3e Mon Sep 17 00:00:00 2001 From: ztimson Date: Sun, 21 Jun 2026 22:45:28 -0400 Subject: [PATCH] Fixed map --- .env | 3 +++ client/package.json | 3 ++- client/src/components/MapView.vue | 11 ++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env b/.env index d8c6062..618ee49 100644 --- a/.env +++ b/.env @@ -1 +1,4 @@ +DEFAULT_LAT= +DEFAULT_LON= +DEFAULT_ALT= INFLUX_TOKEN= diff --git a/client/package.json b/client/package.json index 077e6bb..842050d 100644 --- a/client/package.json +++ b/client/package.json @@ -23,7 +23,8 @@ "vite": "^8.0.16", "vite-plugin-vue-devtools": "^8.1.2", "vue-chartjs": "^5.3.3", - "vue-tsc": "^3.3.5" + "vue-tsc": "^3.3.5", + "vue": "^3.5.38" }, "engines": { "node": "^22.18.0 || >=24.12.0" diff --git a/client/src/components/MapView.vue b/client/src/components/MapView.vue index 4e6f187..c61d0ce 100644 --- a/client/src/components/MapView.vue +++ b/client/src/components/MapView.vue @@ -71,9 +71,10 @@ function buildBaseLayer(dark: boolean) { return new TileLayer({ source: new XYZ({ url: dark - ? 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}.png' - : 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}.png', - attributions: '© Stadia Maps © OpenMapTiles © OpenStreetMap', + ? 'https://{a-d}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png' + : 'https://{a-d}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', + attributions: '© OpenStreetMap © CARTO', + maxZoom: 19, }), zIndex: 0, }) @@ -95,7 +96,7 @@ function buildStationLayer(lat: number, lon: number, dark: boolean): VectorLayer const ringStroke = dark ? 'rgba(255,255,255,0.5)' : 'rgba(0,0,0,0.35)' // Rings at 50, 100, 150, 200 nm - for (const nm of [100, 200, 300]) { + for (const nm of [50, 100, 150, 200]) { const ring = new Feature(new CircleGeom(center, nm * NM)) ring.setStyle(new Style({ stroke: new Stroke({ color: ringStroke, width: 1, lineDash: [6, 4] }), @@ -143,7 +144,7 @@ onMounted(() => { map = new Map({ target: mapEl.value!, layers: [buildBaseLayer(props.dark), stationLayer], - view: new View({ center: fromLonLat([lon, lat]), zoom: 7 }), + view: new View({ center: fromLonLat([lon, lat]), zoom: 8 }), controls: [], })