LocationPickerActivity.java: replace code with a method call

Before this change, there was several lines of code which moved the map center to the EXIF location.

After this change, the several lines of code have been replaced with a simpler method call which produces
the same result.
This commit is contained in:
Jason Whitmore 2024-07-07 19:58:30 -07:00
parent e55f4916ee
commit 47eaff429a

View file

@ -358,12 +358,7 @@ public class LocationPickerActivity extends BaseActivity implements
smallToolbarText.setText(getResources().getString(R.string.pan_and_zoom_to_adjust));
fabCenterOnLocation.setVisibility(View.VISIBLE);
removeSelectedLocationMarker();
if (cameraPosition != null && mapView != null) {
if (mapView.getController() != null) {
mapView.getController().animateTo(new GeoPoint(cameraPosition.getLatitude(),
cameraPosition.getLongitude()));
}
}
moveMapToMediaLocation();
}
/**
@ -401,7 +396,7 @@ public class LocationPickerActivity extends BaseActivity implements
*/
private void showInMapApp() {
fr.free.nrw.commons.location.LatLng position = null;
if(activity.equals("UploadActivity") && cameraPosition != null){
//EXIF location data is available
position = new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),