aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Units/UnitsView.swift
diff options
context:
space:
mode:
Diffstat (limited to 'iosApp/iosApp/Units/UnitsView.swift')
-rw-r--r--iosApp/iosApp/Units/UnitsView.swift10
1 files changed, 9 insertions, 1 deletions
diff --git a/iosApp/iosApp/Units/UnitsView.swift b/iosApp/iosApp/Units/UnitsView.swift
index fc4952f..33598c3 100644
--- a/iosApp/iosApp/Units/UnitsView.swift
+++ b/iosApp/iosApp/Units/UnitsView.swift
@@ -12,6 +12,7 @@ import shared
struct UnitsView: View {
@StateObject var unitsViewModel = UnitsViewModel()
+ @State var shouldShowMenu = false
var body: some View {
NavigationView {
@@ -44,7 +45,14 @@ struct UnitsView: View {
.navigationSearchBarHiddenWhenScrolling(false)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
- Button(action: {}) {
+ Menu {
+ Picker (selection: $unitsViewModel.mapLayerType, label: Text("Map layer")) {
+ Text("OpenStreetMap")
+ .tag(MapLayer.companion.layers[MapLayer.Type_.streets]!)
+ Text("Satellite")
+ .tag(MapLayer.companion.layers[MapLayer.Type_.satellite]!)
+ }
+ } label: {
Image(systemName: "square.stack.3d.up")
}
.visible(unitsViewModel.unitsDisplayMode == .map)