Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I don't think you have to wait 5 seconds for the animation to finish. Whenever the location changes, do something like: cameraPosition = .camera(MapCamera(centerCoordinate: location.coordinate, distance: 800, heading: location.course < 0 ? 0 : location.course, pitch: 60)) where @State private var cameraPosition: MapCameraPosition = .camera(MapCamera(centerCoordinate: .init(latitude: 0, longitude: 0), distance: 800, heading: 0, pitch: 60)) and Map(position: $cameraPosition) {...}. Commented 8 hours ago
  • Tried this variant before but it's not reliable. It works fine when walking but when driving it's laggy....not even close to .userLocation, which uses the device's gyroscope and accelerometer to interpolate between GPS ticks (and whatever Apple uses behind the scenes that is not exposing)... The idea was to use .userLocation somehow with a custom pitch... thank you anyway :) Commented 7 hours ago