mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-21 22:30:46 +08:00
fix: MKLocalSearch 返回坐标与输入坐标对比日志
This commit is contained in:
@@ -722,6 +722,13 @@ struct MapHomeView: View {
|
||||
mapState.selection.revision == revision,
|
||||
let placemark = placemarks.first else { return }
|
||||
|
||||
if let firstItem = mkResponse?.mapItems.first {
|
||||
RuntimeLogger.info("APP", "Geocode", "MKLocalSearch 坐标对比", details: [
|
||||
"输入坐标": "\(coordinate.latitude), \(coordinate.longitude)",
|
||||
"搜索返回坐标": "\(firstItem.placemark.coordinate.latitude), \(firstItem.placemark.coordinate.longitude)",
|
||||
"名称": firstItem.name ?? "nil"
|
||||
])
|
||||
}
|
||||
let mapItemName = mkResponse?.mapItems.first?.name?.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let mapItemPOI = mkResponse?.mapItems.first?.placemark.areasOfInterest?.first
|
||||
// 优先使⽤ MKLocalSearch 结果(与地图显⽰一致),CLGeocoder 作为 fallback
|
||||
|
||||
Reference in New Issue
Block a user