Fixed map

This commit is contained in:
2026-06-21 22:45:28 -04:00
parent 4aa9966f17
commit db3379ee01
3 changed files with 11 additions and 6 deletions

3
.env
View File

@@ -1 +1,4 @@
DEFAULT_LAT=
DEFAULT_LON=
DEFAULT_ALT=
INFLUX_TOKEN=

View File

@@ -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"

View File

@@ -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: [],
})