diff options
author | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-02-27 18:35:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-27 18:35:05 +0100 |
commit | 848d7dff4e682c3d2485366f95649a5de4b1bd75 (patch) | |
tree | cea25172d92d43c222407ea7b6729f00a548af79 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/MapboxConstants.java | |
parent | 43a7db0b0bfd7d626ffed9adff3446fbbe111c15 (diff) | |
download | qtlocation-mapboxgl-848d7dff4e682c3d2485366f95649a5de4b1bd75.tar.gz |
[android ] - new gestures library (cp #11221) (#11332)
* [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
(cherry picked from commit 7905bd6)
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 |