diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-02-27 03:20:22 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-02-27 03:20:22 -0600 |
commit | 117778e29941e3623a2d8c6f9f099ce9b5d2df4b (patch) | |
tree | 14def1d01f631f5b458cbd17d46e7fbafc458e12 /iosApp/iosApp/Units/UnitsViewModel.swift | |
parent | eafb9788615fb733419f64f1b6501b5880922058 (diff) | |
download | etbsa-trackermap-mobile-117778e29941e3623a2d8c6f9f099ce9b5d2df4b.tar.gz etbsa-trackermap-mobile-117778e29941e3623a2d8c6f9f099ce9b5d2df4b.tar.bz2 etbsa-trackermap-mobile-117778e29941e3623a2d8c6f9f099ce9b5d2df4b.zip |
Polygon geofences implemented successfuly
Diffstat (limited to 'iosApp/iosApp/Units/UnitsViewModel.swift')
-rw-r--r-- | iosApp/iosApp/Units/UnitsViewModel.swift | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/iosApp/iosApp/Units/UnitsViewModel.swift b/iosApp/iosApp/Units/UnitsViewModel.swift index 47adeb7..8ba6a4b 100644 --- a/iosApp/iosApp/Units/UnitsViewModel.swift +++ b/iosApp/iosApp/Units/UnitsViewModel.swift @@ -60,7 +60,12 @@ class UnitsViewModel: ObservableObject { } @Published var selectedMarker: Marker? = nil @Published var mapLayerType: MapLayer = .companion.defaultLayer - @Published var geofences: [Int: Geofence] = [:] + @Published var geofences: [Int: Geofence] = [:] { + didSet { + flatGeofences = Array(geofences.values) + } + } + @Published var flatGeofences: [Geofence] = [] init() { unitsController.fetchUnits(scope: mainScope) |