diff options
author | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-02-27 15:51:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 15:51:22 +0100 |
commit | 7905bd68315d8f58c00c07c1ac5756f43de9f6c7 (patch) | |
tree | f470c9592ff180e14d84dc04b9b7cc3b4bff38b5 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java | |
parent | 380f5dc88bb4103a528740e67d887a8695529528 (diff) | |
download | qtlocation-mapboxgl-7905bd68315d8f58c00c07c1ac5756f43de9f6c7.tar.gz |
[android ] - new gestures library (#11221)
* [android] new gesture library - added SNAPSHOT dependency
* [android] new gesture library - cleaned up redundant classes
* [android] new gesture library - limiting scale when rotating
* [android] new gesture library - shove gesture filtering
* [android] new gesture library - increase rotation threshold when scaling
* [android] new gesture library - minimum angular velocity
* [android] new gesture library - exposed gestures execution listeners
* [android] new gesture library - notifying new listeners tests
* [android] new gesture library - removed tracking setting
* [android] new gesture library - resetting focal point with every scale/rotate callback
* [android] new gesture library - fixed camera change dispatcher callbacks
* [android] new gesture library - cancel velocity animations in maps onStop()
* [android] new gesture library - extracted telemetry pushes to a method
* [android] new gesture library - deprecated onScrollListener
* [android] new gesture library - unified shove listener name
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java index 60362dd2e9..6f263e4635 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java @@ -48,6 +48,31 @@ public class MapboxConstants { public static final long VELOCITY_THRESHOLD_IGNORE_FLING = 1000; /** + * Value by which the default rotation threshold will be increased when scaling + */ + public static final float ROTATION_THRESHOLD_INCREASE_WHEN_SCALING = 25f; + + /** + * Time within which user needs to lift fingers for velocity animation to start. + */ + public static final long SCHEDULED_ANIMATION_TIMEOUT = 150L; + + /** + * Minimum angular velocity for rotation animation + */ + public static final float MINIMUM_ANGULAR_VELOCITY = 1.5f; + + /** + * Maximum angular velocity for rotation animation + */ + public static final float MAXIMUM_ANGULAR_VELOCITY = 20f; + + /** + * Factor to calculate tilt change based on pixel change during shove gesture. + */ + public static final float SHOVE_PIXEL_CHANGE_FACTOR = 0.1f; + + /** * The currently supported minimum zoom level. */ public static final float MINIMUM_ZOOM = 0.0f; @@ -78,14 +103,14 @@ public class MapboxConstants { public static final double MINIMUM_DIRECTION = 0; /** - * The currently used minimun scale factor to clamp to when a quick zoom gesture occurs + * The currently used minimum scale factor to clamp to when a quick zoom gesture occurs */ public static final float MINIMUM_SCALE_FACTOR_CLAMP = 0.00f; /** * The currently used maximum scale factor to clamp to when a quick zoom gesture occurs */ - public static final float MAXIMUM_SCALE_FACTOR_CLAMP = 0.45f; + public static final float MAXIMUM_SCALE_FACTOR_CLAMP = 0.15f; /** * Fragment Argument Key for MapboxMapOptions |