mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Show all annotations when there is more than one node
This commit is contained in:
parent
6945144cf6
commit
738bb17551
1 changed files with 7 additions and 3 deletions
|
|
@ -47,7 +47,11 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
// Set user (phone gps) tracking options
|
||||
mapView.setUserTrackingMode(userTrackingMode, animated: true)
|
||||
if userTrackingMode == MKUserTrackingMode.none {
|
||||
mapView.fitAllAnnotations()
|
||||
if latest.count == 1 {
|
||||
mapView.fit(annotations:showNodeHistory ? positions : latest, andShow: false)
|
||||
} else {
|
||||
mapView.fitAllAnnotations()
|
||||
}
|
||||
mapView.showsUserLocation = false
|
||||
} else {
|
||||
mapView.showsUserLocation = true
|
||||
|
|
@ -151,8 +155,8 @@ struct MapViewSwiftUI: UIViewRepresentable {
|
|||
mapView.showsUserLocation = false
|
||||
mapView.addAnnotations(showNodeHistory ? positions : latest)
|
||||
if recenter {
|
||||
if showRouteLines || showNodeHistory {
|
||||
mapView.fit(annotations: showNodeHistory ? positions : latest, andShow: false)
|
||||
if latest.count == 1 {
|
||||
mapView.fit(annotations:showNodeHistory ? positions : latest, andShow: false)
|
||||
} else {
|
||||
mapView.fitAllAnnotations()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue