HiI am working on a walk tracking app adn would like to rotate the map so that when i am walking the map rotates so that my heading is always pointing to the top of the screen. I sort of have it working but the map keeps resetting back to normal rotation.private func startLocationUpdates() { // our delegate locationManager.delegate = self //sets the orintation of the phone locationManager.headingOrientation = .portrait // our type filter locationManager.activityType = .fitness //can be automotive locationManager.distanceFilter = 10 locationManager.startUpdatingLocation() // check to see if we can get a heading update if (CLLocationManager.headingAvailable()) { // 5 degree change before we update locationManager.headingFilter = 5 locationManager.startUpdatingHeading() } }I use the locationmanagers updateheading then set teh camera heading to thatmapView.camera.heading = newHeading.trueHeading mapView.setCamera(mapView.camera, animated: true)
1
0
869