[android] Fixed wrong location view interpolation (#6668)
This commit is contained in:
@@ -691,7 +691,7 @@ public class MyLocationView extends View {
|
||||
// calculate interpolated location
|
||||
previousLocation = latLng;
|
||||
latLng = new LatLng(location);
|
||||
interpolatedLocation = new LatLng((latLng.getLatitude() + previousLocation.getLatitude()) / 2, (latLng.getLongitude() + previousLocation.getLongitude()) / 2);
|
||||
interpolatedLocation = new LatLng(latLng.getLatitude() , latLng.getLongitude());
|
||||
|
||||
// build new camera
|
||||
CameraPosition.Builder builder = new CameraPosition.Builder().target(interpolatedLocation);
|
||||
@@ -751,7 +751,7 @@ public class MyLocationView extends View {
|
||||
long locationUpdateDuration = (long) ((locationUpdateTimestamp - previousUpdateTimeStamp) * 1.3);
|
||||
|
||||
// calculate interpolated entity
|
||||
interpolatedLocation = new LatLng((latLng.getLatitude() + previousLocation.getLatitude()) / 2, (latLng.getLongitude() + previousLocation.getLongitude()) / 2);
|
||||
interpolatedLocation = new LatLng(latLng.getLatitude() , latLng.getLongitude());
|
||||
|
||||
// animate changes
|
||||
if (locationChangeAnimator != null) {
|
||||
|
||||
Reference in New Issue
Block a user