From 9be12ad1d7c9d0db2b7e827ae82ee6689b5bae6c Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 6 Apr 2026 12:54:22 +0800 Subject: [PATCH] Clarify NMC nearby station labels on the map --- 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 1ebea600..3bd8b202 100644 --- a/frontend/hooks/useLeafletMap.ts +++ b/frontend/hooks/useLeafletMap.ts @@ -79,12 +79,18 @@ function createMarkerIcon( function buildNearbyIconHtml(detail: CityDetail, station: NearbyStation) { const symbol = detail.temp_symbol || "°C"; - const label = + const rawLabel = station.station_label || station.name || station.station_code || station.icao || "实测 (OBS)"; + const label = + String(station.source_code || station.source_label || "").trim().toLowerCase() === "nmc" && + /\(NMC\)$/i.test(String(rawLabel)) && + !String(rawLabel).includes("区域实况") + ? String(rawLabel).replace(/\s*\(NMC\)$/i, "区域实况 (NMC)") + : rawLabel; let windHtml = ""; if (station.wind_dir != null) {