Rotate GMSMapView based on compass
<p>I'm working on an app where manual interaction with map is not allowed. The only way to change the map is as user is moving towards a direction. So if a user rotates the phone rotates and so based on the compass in iPhone the map should rotate automatically rather than user rotating it to the direction by 2 fingers gestures. Here is a picture that clear the idea a little more:
<a href="https://i.stack.imgur.com/VThkr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VThkr.png" alt="enter image description here" /></a>
Consider the red dot as my location and as I rotate my phone I want google map to rotate with it. So my question is that how this can be achieved? As there is a method I found <code>[_myMap animateToViewingAngle:45];</code> after searching but this didn't did what I was looking for.</p>
<p><strong>EDIT</strong> I thought of this is there any way we can convert lat and long values to angle?</p>