blob: e77c2b77d9ba8cc77765e11b983d66032132ac56 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
//
// ContentView.swift
// Hæ-appen
//
// Created by Ivar Løvlie on 16/09/2025.
//
import SwiftUI
import MapKit
struct MapContentView: View {
@Namespace var mapScope
@State private var position: MapCameraPosition = .automatic
var annotationStringKey: LocalizedStringKey = "Annotation"
var annotationCoordinate: CLLocationCoordinate2D = CLLocationCoordinate2D.init()
var body: some View {
VStack {
Map(initialPosition: .userLocation(fallback: position), scope: mapScope)
}
.task {
LocationAuthorizer.shared.requestWhenInUse()
}
}
}
#Preview {
MapContentView()
}
|