Skip to content

Commit

Permalink
fix view direction was wrong when map was rotated
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Aug 22, 2024
1 parent bb6319c commit 89511f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class MainMapFragment : MapFragment(), ShowsGeometryMarkers {
}

private fun onCompassRotationChanged(rot: Float, tilt: Float) {
locationMapComponent?.rotation = (rot * 180 / PI) + (map?.camera?.rotation ?: 0.0)
locationMapComponent?.rotation = (rot * 180 / PI) - (map?.camera?.rotation ?: 0.0)
}

private fun onLocationChanged(location: Location) {
Expand Down

0 comments on commit 89511f4

Please sign in to comment.