Gajendra Rawat
Gajendra Rawat

Reputation: 3663

stop rotation of map through heading

I have rotated the map through didupdateheading. and setMKUserFollowWithHeading. Now if i move the device the user always points towards north. I want to stop the rotation of map through stop button to the position it had already rotated.

How is that possible?

Upvotes: 0

Views: 167

Answers (1)

Himanshu Joshi
Himanshu Joshi

Reputation: 3399

Take the angle about which the map has rotated by

heading = newHeading.trueHeading;

and transform the map in Stop button by implementing Stop button method as:

[mapView setTransform:CGAffineTransformMakeRotation(heading * M_PI /180.0f); 

Upvotes: 1

Related Questions