feat(wind): Live-Windrichtung vom Standort (Open-Meteo) (v1.6.1)
- Neuer „Live vom Standort"-Knopf in der Windrose holt die aktuelle Windrichtung + Geschwindigkeit von Open-Meteo (kostenlos, ohne Key) - Beim Öffnen eines Einsatzes ohne gesetzten Wind wird die Windrichtung automatisch vom Einsatzort vorgeschlagen (einmal pro Projekt, online) - Toast zeigt Richtung, Grad, km/h und Böen - Neue lib/wind.ts (fetchLiveWind) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,8 @@ interface MapViewProps {
|
||||
/** Windrichtung fürs Lagebild (Grad, „Wind aus") + Setter */
|
||||
windDirection?: number | null
|
||||
onWindChange?: (dir: number | null) => void
|
||||
/** Live-Wind (Open-Meteo) für den aktuellen Standort holen */
|
||||
onFetchLiveWind?: () => Promise<void> | void
|
||||
}
|
||||
|
||||
export function MapView({
|
||||
@@ -116,6 +118,7 @@ export function MapView({
|
||||
onToggleFullscreen,
|
||||
windDirection,
|
||||
onWindChange,
|
||||
onFetchLiveWind,
|
||||
}: MapViewProps) {
|
||||
const mapContainer = useRef<HTMLDivElement | null>(null)
|
||||
const map = useRef<maplibregl.Map | null>(null)
|
||||
@@ -2209,6 +2212,7 @@ export function MapView({
|
||||
windDirection={windDirection}
|
||||
canEdit={canEdit}
|
||||
onWindChange={(dir) => onWindChange?.(dir)}
|
||||
onFetchLiveWind={onFetchLiveWind}
|
||||
/>
|
||||
|
||||
{/* Moveable controls for selected symbol */}
|
||||
|
||||
Reference in New Issue
Block a user