Geocron leicht verbessert

This commit is contained in:
Eskimue
2026-04-02 15:53:32 +02:00
parent 1156cb66dc
commit b7a53e9912
2 changed files with 33 additions and 1 deletions
+21 -1
View File
@@ -11,10 +11,30 @@
(function () {
const userLocation = window.GeocronUserLocation;
const userLocationMarker = userLocation
&& Number.isFinite(Number(userLocation.latitude))
&& Number.isFinite(Number(userLocation.longitude))
? {
name: userLocation.name || "Dein Standort",
lat: Number(userLocation.latitude),
lon: Number(userLocation.longitude),
color: "rgba(255, 215, 90, 0.98)",
glow: "rgba(255, 215, 90, 0.75)",
radius: 6,
showLabel: true,
popup: `${userLocation.name || "Dein Standort"}\n${Number(userLocation.latitude).toFixed(4)}° / ${Number(userLocation.longitude).toFixed(4)}°`
+ (userLocation.elevation !== null && userLocation.elevation !== undefined
? `\n${Number(userLocation.elevation).toFixed(0)} m`
: ""),
}
: null;
// ═══════════════════════════════════════════════════════════════
// MARKER-LISTE – hier eintragen
// ═══════════════════════════════════════════════════════════════
const MARKERS = [
...(userLocationMarker ? [userLocationMarker] : []),
// ═══════════════════════════════════════════════════════════
// EIGENE STANDORTE
@@ -28,7 +48,7 @@
iconW: 67,
iconH: 45,
showLabel: false,
popup: "Astronomiemuseum\nSternwarte Rodewisch",
popup: "Astronomiemuseum\nSternwarte Sonneberg",
},
{