mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Change location user tracking mode to use less battery
This commit is contained in:
parent
1a80b47491
commit
93ff4b28bb
3 changed files with 5 additions and 3 deletions
|
|
@ -42,7 +42,7 @@ extension PositionEntity {
|
|||
}
|
||||
|
||||
extension PositionEntity: MKAnnotation {
|
||||
public var coordinate: CLLocationCoordinate2D { nodeCoordinate ?? CLLocationCoordinate2D(latitude: 0.0, longitude: 0.0) }
|
||||
public var coordinate: CLLocationCoordinate2D { nodeCoordinate ?? LocationHelper.DefaultLocation }
|
||||
public var title: String? { nodePosition?.user?.shortName ?? NSLocalizedString("unknown", comment: "Unknown") }
|
||||
public var subtitle: String? { time?.formatted() }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
mapView.showsBuildings = true;
|
||||
mapView.addAnnotations(positions)
|
||||
mapView.showsUserLocation = true
|
||||
mapView.setUserTrackingMode(.followWithHeading, animated: true)
|
||||
mapView.setUserTrackingMode(.none, animated: false)
|
||||
mapView.showsCompass = true
|
||||
mapView.showsScale = true
|
||||
mapView.isScrollEnabled = true
|
||||
|
|
|
|||
|
|
@ -355,7 +355,9 @@ struct NodeDetail: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
} }
|
||||
}
|
||||
.padding(5)
|
||||
}
|
||||
}
|
||||
}
|
||||
.edgesIgnoringSafeArea([.leading, .trailing])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue