Reputation: 15432
Apple's latest Maps application allows a user to rotate a map. How can I add this functionality to my MKMapView? I presumed it'd just be a case of setting a boolean property (similar to zoomEnabled
), but I can't find anything relevant in the documentation.
Upvotes: 3
Views: 662
Reputation: 748
Actually MKMapView does support map rotation starting with iOS 5.0. Either you use the MKUserTrackingBarButtonItem
control in your toolbar (user taps it until the map is rotating), or you set the userTrackingMode
property to MKUserTrackingModeFollowWithHeading
.
Upvotes: 2
Reputation: 9977
There is no built-in rotation support in the MapKit
of iOS. You could use regular view transforms (but than all street names etc. will also be rotated of course), or you use the Google Maps SDK or MapBox or something else.
The Google Maps SDK does support rotation, even 3D rotation. The SDK Download includes an example project showcasing the functionality.
Upvotes: 2