Reputation: 21
I need to figure out how to not let MKMapView in ios7 reset the heading of it's internal MKMapCamera's heading when at high altitudes.
Here's the issue:
When at low altitudes, the user can easily rotate the map 360 degrees. At high altitudes, the user can begin to rotate the map, but the mapview quickly "rubber bands" the heading back to 0.
Changing the heading of the internal MKMapCamera programmatically works fine at high altitudes. Here's where my concern comes in:
I need to show north up at all times, but still allow the user to zoom in and out from the map. I can programmatically keep the heading given the course from CLLocation. If a user were to pinch(zoom out) of the map though, MKMapView would immediately tell it's internal camera "Oh no! you're too high, better go ahead and rotate you to 0 heading again."
Is there anyway to tell MKMapView to NOT EVER set it's internal MKMapCamera automatically?
Upvotes: 1
Views: 643
Reputation: 28727
If your app is in follow vehicle mode, I would reduce/limt the zoom level such that the unwanted back rotation does not happen.
Caluclate the zoom level by calulating the number of meters of the map diagonal. Manually find out which "zoom" value is safe.
Upvotes: 1