From 2e44b40b862f469f5f81a145ec7dc73d5fb963d3 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 6 Apr 2026 11:19:22 +0800 Subject: [PATCH] Prefer station labels in nearby map markers --- frontend/hooks/useLeafletMap.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/hooks/useLeafletMap.ts b/frontend/hooks/useLeafletMap.ts index 9f5fc2f9..9eca3e92 100644 --- a/frontend/hooks/useLeafletMap.ts +++ b/frontend/hooks/useLeafletMap.ts @@ -79,6 +79,12 @@ function createMarkerIcon( function buildNearbyIconHtml(detail: CityDetail, station: NearbyStation) { const symbol = detail.temp_symbol || "°C"; + const label = + station.station_label || + station.name || + station.station_code || + station.icao || + "实测 (OBS)"; let windHtml = ""; if (station.wind_dir != null) { @@ -100,7 +106,7 @@ function buildNearbyIconHtml(detail: CityDetail, station: NearbyStation) {