From 29ccc7aba92af0251999e7691485becc3da21fb5 Mon Sep 17 00:00:00 2001 From: ztimson Date: Thu, 25 Jun 2026 15:54:51 -0400 Subject: [PATCH] AIS, ADSB, and Range --- client/src/components/MapView.vue | 8 +++++++- client/src/services/ais.ts | 18 +++++++++++++++++- client/src/services/range.ts | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/client/src/components/MapView.vue b/client/src/components/MapView.vue index 5e51435..a1710b6 100644 --- a/client/src/components/MapView.vue +++ b/client/src/components/MapView.vue @@ -115,7 +115,13 @@ function tickPercent(index: number) { } function toggleAT() { - atActive.value ? airTraffic.hide() : airTraffic.show() + if(atActive.value) { + aisLayer.hide() + airTraffic.hide() + } else { + aisLayer.show() + airTraffic.show() + } atActive.value = !atActive.value } diff --git a/client/src/services/ais.ts b/client/src/services/ais.ts index 086baee..9c643b9 100644 --- a/client/src/services/ais.ts +++ b/client/src/services/ais.ts @@ -23,10 +23,26 @@ const SHIP_COLORS: Record = { function buildBoatIcon(boat: any): string { const color = SHIP_COLORS[boat.type] || SHIP_COLORS['Unknown'] - const heading = boat.heading ?? boat.course ?? 0 + + if (boat.type === 'Base Station') { + return `data:image/svg+xml,${encodeURIComponent(` + + + + + + + + `)}` + } + return `data:image/svg+xml,${encodeURIComponent(` + + + + `)}` } diff --git a/client/src/services/range.ts b/client/src/services/range.ts index ad42a31..ccb6fa3 100644 --- a/client/src/services/range.ts +++ b/client/src/services/range.ts @@ -24,7 +24,7 @@ export class RangeLayer { const feature = new Feature({ geometry: new Polygon([coords]) }) feature.setStyle(new Style({ - stroke: new Stroke({ color: '#00ffcc', width: 1.5 }) + stroke: new Stroke({ color: 'rgb(0 171 138 / 0.53)', width: 1.5 }) })) const source = new VectorSource({ features: [feature] })