From b2d034ecfc936814d3ba576f9270a85949532db7 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Tue, 27 Feb 2024 17:22:56 -0800 Subject: [PATCH] Revert to turn off node history --- .../Nodes/Helpers/Map/NodeMapSwiftUI.swift | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift index 43da8508..40dd5271 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/NodeMapSwiftUI.swift @@ -100,25 +100,6 @@ struct NodeMapSwiftUI: View { ForEach(positionArray, id: \.id) { position in let pf = PositionFlags(rawValue: Int(position.nodePosition?.metadata?.positionFlags ?? 771)) let headingDegrees = Angle.degrees(Double(position.heading)) - /// Reduced Precision Map Circle -// if position.latest && 11...16 ~= position.precisionBits { -// let pp = PositionPrecision(rawValue: Int(position.precisionBits)) -// let radius : CLLocationDistance = pp?.precisionMeters ?? 0 -// if radius > 0.0 { -// MapCircle(center: position.coordinate, radius: radius) -// .foregroundStyle(Color(nodeColor).opacity(0.25)) -// } -// } -// if position.latest { -// if 11...16 ~= position.precisionBits { -// let pp = PositionPrecision(rawValue: Int(position.precisionBits)) -// let radius : CLLocationDistance = pp?.precisionMeters ?? 0 -// if radius > 0.0 { -// MapCircle(center: position.coordinate, radius: radius) -// .foregroundStyle(Color(nodeColor).opacity(0.25)) -// } -// } -// } Annotation(position.latest ? node.user?.shortName ?? "?": "", coordinate: position.coordinate) { LazyVStack { if position.latest { @@ -275,7 +256,7 @@ struct NodeMapSwiftUI: View { if node.positions?.count ?? 0 > 1 { position = .automatic } else { - position = .camera(MapCamera(centerCoordinate: mostRecent!.coordinate, distance: 5000, heading: 0, pitch: 60)) + position = .camera(MapCamera(centerCoordinate: mostRecent!.coordinate, distance: 150, heading: 0, pitch: 60)) } if self.scene == nil { Task { @@ -341,6 +322,13 @@ struct NodeMapSwiftUI: View { .foregroundColor(.accentColor) .buttonStyle(.borderedProminent) } +#if targetEnvironment(macCatalyst) + /// Hide non fuctional catalyst controls + // MapZoomStepper(scope: mapScope) + // .mapControlVisibility(.visible) + // MapPitchSlider(scope: mapScope) + // .mapControlVisibility(.visible) +#endif } .controlSize(.regular) .padding(5)