mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Merge pull request #1255 from RCGV1/waypoint-my-location-button
Seperated button
This commit is contained in:
commit
85abbb058e
2 changed files with 8 additions and 2 deletions
|
|
@ -33445,6 +33445,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Use my Location" : {
|
||||
|
||||
},
|
||||
"Use Preset" : {
|
||||
"localizations" : {
|
||||
|
|
|
|||
|
|
@ -49,15 +49,18 @@ struct WaypointForm: View {
|
|||
.foregroundColor(.secondary)
|
||||
.font(.caption)
|
||||
|
||||
}
|
||||
Button {
|
||||
let currentLoc = LocationsHandler.currentLocation
|
||||
waypoint.coordinate.longitude = currentLoc.longitude
|
||||
waypoint.coordinate.latitude = currentLoc.latitude
|
||||
} label: {
|
||||
Image(systemName: "location")
|
||||
HStack {
|
||||
Text("Use my Location")
|
||||
Image(systemName: "location")
|
||||
}
|
||||
}
|
||||
.accessibilityLabel("Set to current location")
|
||||
}
|
||||
HStack {
|
||||
if waypoint.coordinate.latitude != 0 && waypoint.coordinate.longitude != 0 {
|
||||
DistanceText(meters: distance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue