fix: refresh MapKit coordinate type at runtime

This commit is contained in:
xweiba
2026-08-07 14:13:25 +08:00
parent 7e362e6b6c
commit 8acc33186c
7 changed files with 371 additions and 57 deletions
+7
View File
@@ -222,6 +222,13 @@ final class MapLocationState: ObservableObject {
if coordinate == nil { realtimeLocation = nil }
}
/// Discards a blue-point sample represented in a superseded MapKit
/// coordinate system. The next native callback repopulates the cache.
func clearRealtimeLocationForMapCoordinateSystemChange() {
realtimeLocation = nil
realtimeCoordinate = nil
}
func updateExplicitName(_ name: String, forFavoriteID favoriteID: UUID) {
guard selection.source == .favorite(favoriteID) else { return }
selection = MapSelection(