diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2016-11-09 10:42:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-09 10:42:18 +0100 |
commit | 772324e8f2a316bf82774732dd60bb7af5acdb18 (patch) | |
tree | 34109021f9e7ae14a732c5f98627c892267e9d2d /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java | |
parent | efc427f9bbf7fb4b8d8895613dbb29716d5d7b11 (diff) | |
download | qtlocation-mapboxgl-772324e8f2a316bf82774732dd60bb7af5acdb18.tar.gz |
Cherry pick release v4.2.0 (#6944)
* [android] - MyLocationView should facing above when location and compass bearing tracking are enabled. (#6829)
* [android] - use current animated rotation value for calculating animated marker rotation difference (#6826)
fix unit tests, input limiting is not handled by animateRotationBy instead of MarkerView.
Changed test to validate if method was called with correct value.
* [android] - only calculated offset margins for InfoWindow if View is found in current viewport, added example to the test app to test for regressions (#6877)
* upgraded okhttp dependency to latest version (#6880)
* Cancelable callback invocation (#6891)
* [android] - allow onCancel to be invoked from camera cancel callbacks
* set to null after finish
* [android] - using bearing clockwise versus counterclockwise (#6917)
* [android] - using bearing clockwise versus counterclockwise
* fixup brackets
* [android] - convert bearing values from core to Android SDK equivalent.
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java index 175fd57da4..72037c2565 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java @@ -265,17 +265,9 @@ public class MarkerView extends Marker { newRotation += 360; } - // calculate new direction - float diff = newRotation - this.rotation; - if (diff > 180.0f) { - diff -= 360.0f; - } else if (diff < -180.0f) { - diff += 360.f; - } - this.rotation = newRotation; if (markerViewManager != null) { - markerViewManager.animateRotationBy(this, diff); + markerViewManager.animateRotationBy(this, newRotation); } } |