Use location manager to show user location on the map

This commit is contained in:
Joshua Pirihi 2022-01-10 19:23:30 +13:00
parent 54f160eab2
commit 6d90211ab5

View file

@ -72,7 +72,7 @@ struct NodeMap: View {
@State private var showUserLocation: Bool = true
@State private var userTrackingMode: MKUserTrackingMode = MKUserTrackingMode.none
@State private var userLocation: CLLocationCoordinate2D?
@State private var userLocation: CLLocationCoordinate2D? = LocationHelper.currentLocation
@State private var showAnnotations: Bool = true
@State private var annotations: [MKPointAnnotation] = []
@ -84,7 +84,7 @@ struct NodeMap: View {
var body: some View {
//let location = LocationHelper.currentLocation
//self.$userLocation = LocationHelper.currentLocation
NavigationView {