[android] - rework ease interactions to take in account possitve duration requirement

This commit is contained in:
Tobrun
2017-10-31 13:18:41 -07:00
committed by Tobrun
parent 9aa2c197ca
commit 03d3aee6fc
2 changed files with 5 additions and 10 deletions

View File

@@ -150,12 +150,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())
);
}

View File

@@ -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()));
}
}