diff options
author | Tobrun <tobrun.van.nuland@gmail.com> | 2017-10-31 13:18:41 -0700 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2017-10-31 15:28:19 -0700 |
commit | 56c2af5670852312f788f83ff86d80447c30b0fd (patch) | |
tree | 49919ed1a13c88313f51f351d808c9a717c924c9 /platform/android | |
parent | e0a305247abcf58c4d1d0ef234d7a9b1ba768554 (diff) | |
download | qtlocation-mapboxgl-56c2af5670852312f788f83ff86d80447c30b0fd.tar.gz |
[android] - rework ease interactions to take in account possitve duration requirement
Diffstat (limited to 'platform/android')
2 files changed, 8 insertions, 13 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index f25e05429e..83b4dc4e84 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -149,12 +149,8 @@ public final class MapboxMap { trackingSettings.onRestoreInstanceState(savedInstanceState); if (cameraPosition != null) { - easeCamera(CameraUpdateFactory.newCameraPosition( - new CameraPosition.Builder(cameraPosition).build()), - 0, - false, - null, - !trackingSettings.isLocationTrackingDisabled() + moveCamera(CameraUpdateFactory.newCameraPosition( + new CameraPosition.Builder(cameraPosition).build()) ); } @@ -1677,9 +1673,9 @@ public final class MapboxMap { /** * Get a camera position that fits a provided shape with a given bearing and padding. * - * @param geometry the geometry to constrain the map with - * @param bearing the bearing at which to compute the geometry's bounds - * @param padding the padding to apply to the bounds + * @param geometry the geometry to constrain the map with + * @param bearing the bearing at which to compute the geometry's bounds + * @param padding the padding to apply to the bounds * @return the camera position that fits the bounds and padding */ public CameraPosition getCameraForGeometry(Geometry geometry, double bearing, int[] padding) { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java index 983ba2550f..ac91746a2a 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java @@ -49,6 +49,7 @@ import timber.log.Timber; * <p> * Use {@link MyLocationViewSettings} to manipulate the state of this view. * </p> + * * @deprecated use location layer plugin from * https://github.com/mapbox/mapbox-plugins-android/tree/master/plugins/locationlayer instead. */ @@ -639,8 +640,7 @@ public class MyLocationView extends View { if (location != null) { if (myLocationTrackingMode == MyLocationTracking.TRACKING_FOLLOW) { // center map directly - mapboxMap.easeCamera(CameraUpdateFactory.newLatLng(new LatLng(location)), 0, false /*linear interpolator*/, - null, true); + mapboxMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(location))); } else { // do not use interpolated location from tracking mode latLng = null; @@ -1022,8 +1022,7 @@ public class MyLocationView extends View { mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(builder.build()), animationDuration, false, null, true); } else { - mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(builder.build()), 0, false, null, - true); + mapboxMap.moveCamera(CameraUpdateFactory.newCameraPosition(builder.build())); } } |