Jonathan
Jonathan

Reputation: 15432

MKMapView rotation

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

Answers (2)

sven7
sven7

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

calimarkus
calimarkus

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

Related Questions