[android] - redraw MyLocationView when tilt changes, setTilt after CameraUpdate has finished animating (#7799)
This commit is contained in:
@@ -73,7 +73,7 @@ final class Transform implements MapView.OnMapChangedListener {
|
||||
@Override
|
||||
public void onMapChanged(@MapView.MapChange int change) {
|
||||
if (change == REGION_DID_CHANGE_ANIMATED && cameraCancelableCallback != null) {
|
||||
invalidateCameraPosition();
|
||||
updateCameraPosition(invalidateCameraPosition());
|
||||
if (cameraCancelableCallback != null) {
|
||||
cameraCancelableCallback.onFinish();
|
||||
cameraCancelableCallback = null;
|
||||
|
||||
@@ -310,6 +310,7 @@ public class MyLocationView extends View {
|
||||
if (myLocationTrackingMode == MyLocationTracking.TRACKING_FOLLOW) {
|
||||
mapboxMap.getUiSettings().setFocalPoint(new PointF(getCenterX(), getCenterY()));
|
||||
}
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void setBearing(double bearing) {
|
||||
@@ -327,8 +328,8 @@ public class MyLocationView extends View {
|
||||
|
||||
public void setCameraPosition(CameraPosition position) {
|
||||
if (position != null) {
|
||||
setTilt(position.tilt);
|
||||
setBearing(position.bearing);
|
||||
setTilt(position.tilt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user