[android] - when updating positon, wait for render call to invalidate updated marker position, correct camera invalidation for all moveCamera method invocations (#7794)
This commit is contained in:
@@ -342,6 +342,7 @@ public class MarkerView extends Marker {
|
||||
public void setPosition(LatLng position) {
|
||||
super.setPosition(position);
|
||||
if (markerViewManager != null) {
|
||||
markerViewManager.setWaitingForRenderInvoke(true);
|
||||
markerViewManager.update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,9 +515,6 @@ public final class MapboxMap {
|
||||
@UiThread
|
||||
public final void moveCamera(CameraUpdate update) {
|
||||
moveCamera(update, null);
|
||||
// MapChange.REGION_DID_CHANGE_ANIMATED is not called for `jumpTo`
|
||||
// invalidate camera position to provide OnCameraChange event.
|
||||
invalidateCameraPosition();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -534,6 +531,9 @@ public final class MapboxMap {
|
||||
@Override
|
||||
public void run() {
|
||||
transform.moveCamera(MapboxMap.this, update, callback);
|
||||
// MapChange.REGION_DID_CHANGE_ANIMATED is not called for `jumpTo`
|
||||
// invalidate camera position to provide OnCameraChange event.
|
||||
invalidateCameraPosition();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user