From ba17fd765b0a5af5335ebd94ac2e0e226a8bbb85 Mon Sep 17 00:00:00 2001 From: xweiba Date: Wed, 5 Aug 2026 22:50:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=9D=90=E6=A0=87=E6=89=93=E5=8D=B0=E5=88=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App/MapHomeView.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/App/MapHomeView.swift b/App/MapHomeView.swift index d1ccfdb..1256caa 100644 --- a/App/MapHomeView.swift +++ b/App/MapHomeView.swift @@ -789,7 +789,7 @@ struct MapHomeView: View { return } searchResults = (response?.mapItems ?? []).prefix(6).map { item in - SearchLocationResult( + let r = SearchLocationResult( name: item.name ?? "未命名", subtitle: [item.placemark.locality, item.placemark.subLocality, item.placemark.thoroughfare] .compactMap { $0 } @@ -797,6 +797,11 @@ struct MapHomeView: View { .joined(separator: " · "), coordinate: item.placemark.coordinate ) + RuntimeLogger.info("APP", "搜索", "结果: \(r.name)", details: [ + "lat": String(r.coordinate.latitude), + "lon": String(r.coordinate.longitude) + ]) + return r } if searchResults.isEmpty { searchError = "没有找到相关地点" } }