LocationPickerActivity.java: remove redundant code

Before this change, there was two sections of code which moved the map center to the same location. Both of these code sections
occur very close to each other (one in onCreate(), the other in setupMapView())

After this change, the code section in onCreate() has been removed. With the map centering code only in the setupMapView() method.
This change eliminates redundancy, reduces the amount of code in onCreate(), and makes this java file easier to understand.
This commit is contained in:
Jason Whitmore 2024-07-08 14:44:53 -07:00
parent 47eaff429a
commit b803474e22

View file

@ -238,16 +238,6 @@ public class LocationPickerActivity extends BaseActivity implements
cameraPosition.getLongitude()));
}
setupMapView();
if("UploadActivity".equals(activity)){
if(mapView != null && mapView.getController() != null && cameraPosition != null){
GeoPoint cameraGeoPoint = new GeoPoint(cameraPosition.getLatitude(),
cameraPosition.getLongitude());
mapView.getController().setCenter(cameraGeoPoint);
mapView.getController().animateTo(cameraGeoPoint);
}
}
}
/**