From 7feaa7dd9cf325b3f7e53642806dd0e38004f4db Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 1 Sep 2023 07:11:49 -0500 Subject: [PATCH] Finally got to the bottom of the Mesh Map not updating bug! --- Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift index f6d4a9e6..0373daf9 100644 --- a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift +++ b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift @@ -251,18 +251,17 @@ struct MapViewSwiftUI: UIViewRepresentable { mapView.removeAnnotations(mapView.annotations) mapView.addAnnotations(waypoints) } + mapView.addAnnotations(showNodeHistory ? positions : latest) if userTrackingMode == MKUserTrackingMode.none { mapView.showsUserLocation = false if UserDefaults.enableMapRecentering { if latest.count == 1 { mapView.fit(annotations: showNodeHistory ? positions : latest, andShow: true) } else { - mapView.addAnnotations(showNodeHistory ? positions : latest) mapView.fitAllAnnotations() } } } else { - mapView.addAnnotations(showNodeHistory ? positions : latest) mapView.showsUserLocation = true } mapView.setUserTrackingMode(userTrackingMode, animated: true)