Replies: 2 comments 1 reply
-
혹시 baseLocation이 어떻게 활용되고 있을까요? 전체 코드 공유 가능할까요 ? :) |
Beta Was this translation helpful? Give feedback.
-
.onAppear {
if let userLocation = locationManager.location/*, !isRegionSet*/ {
region = MKCoordinateRegion(center: userLocation.coordinate, span: MKCoordinateSpan(latitudeDelta: 0.05, longitudeDelta: 0.05))
baseLocation = userLocation.coordinate
// isRegionSet = false // 초기 위치가 설정되었음을 표시
}
} ![]()
위치 권한과 위치 업데이트
https://medium.com/@desilio/getting-user-location-with-swiftui-1f79d23c2321 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
현상
swiftui에서 mapkit을 사용중인데 사용자의 현재 위치에서 annotation을 사용하는것은 가능하나, 위치가 변경될 시 annotation이 기존 위치에서 찍히고 변경된 위치에서 찍히지 않음
user location button은 작동하지만 map rotation, 3d 코드를 써도 작동이 안됨
원인
시도
을 하면 변경되는 위치에는 찍히지만, 지도 이동이 불가해짐
Beta Was this translation helpful? Give feedback.
All reactions