MKUserTrackingModeFollowWithHeading and setCamera conflicts

Originator:JustZht
Number:rdar://22539174 Date Originated:03-Sep-2015 12:32 AM GMT +8
Status:Open Resolved:Duplicate of 15374402 (Open)
Product:iOS SDK Product Version:8.0+
Classification: Reproducible:Always
 
When using MKMapkit, if you set:
"MapView.userTrackingMode = MKUserTrackingModeFollowWithHeading"
and you also set a custom "MKMapCamera",
you will get MKUserTrackingModeFollowWithHeading overwrites your custom camera settings (pitch , altitude).
Even, if you turn on "setCamera animated:YES",the two conflicts and the animate perform completely wrong ,not showing your position, but a  place that in the middle of your MKCoordinateRegion and your current location.

Steps to Reproduce:
1.run the project please ,thank you :-)
2.the project -> MapViewController.m contains two code blocks that conflict, they are
"
self.HackMapView.userTrackingMode = MKUserTrackingModeFollowWithHeading
"
AND
"
MKMapCamera *newCamera = [[HackMapView camera] copy];
        [newCamera setPitch:45.0];
        [newCamera setHeading:90.0];
        [newCamera setAltitude:500.0];
        [HackMapView setCamera:newCamera animated:YES];
"
they aim at two different function but they conflict, you can remove one of code blocks to see the result.

Expected Results:
the MKUserTrackingModeFollowWithHeading shouldn't overwrite my own mapcamera's settings, I mean, if I set TrackingMode to follow and I set a camera with pitch, the pitch should keep its degress even I moved around and map following my position.

Actual Results:
MKUserTrackingModeFollowWithHeading overwrites my custom map camera settings (pitch , altitude).
At first ,map camera did changed its pitch and altitude ,
but after MKMapview have my location from CLLocationManager , map goes to my location and when the map going animation done, map camera settings had changed to the default one.
OR EVEN, map not show my position ,but a  place that in the middle of your MKCoordinateRegion and your current location.
I think the "setCamera" and "MKUserTrackingModeFollowWithHeading" are both performing map transition animations ,"setCamera" aims at MKCoordinateRegion and "MKUserTrackingModeFollowWithHeading" at my current location ,so at last it shows a place in the middle of my MKCoordinateRegion and my current location.

Version:
iOS 8.3

Notes:
SEE:
http://openradar.appspot.com/15374402
http://stackoverflow.com/questions/19606648/weird-mkmapview-behaviour-when-setting-mkmapcamera-in-mkusertrackingmodefollowwi

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!