diff options
author | Pablo Guardiola <guardiola31337@gmail.com> | 2017-07-27 15:38:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-27 15:38:53 +0200 |
commit | 175e7e26e2008d1e55664bd1064536c23b6de86a (patch) | |
tree | 105713e97d9ef0a6a4f8d8a027b951f4fa1cf773 /platform | |
parent | 39face8e1017b83fb8a9da99224e5ac02e22d6cd (diff) | |
download | qtlocation-mapboxgl-175e7e26e2008d1e55664bd1064536c23b6de86a.tar.gz |
[android] fix compass direction (Transform::getCameraOptions returns counterclockwise angle after transform.invalidateCameraPosition() which needs to be transformed to a clockwise bearing) (#9632)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java index e8891429f9..e71d509fcf 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/UiSettings.java @@ -427,7 +427,8 @@ public final class UiSettings { return; } - compassView.update(cameraPosition.bearing); + double clockwiseBearing = -cameraPosition.bearing; + compassView.update(clockwiseBearing); } /** |