mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-31 23:03:54 +01:00
LocationPickerActivity.java: add code to move map to either EXIF or device GPS location
Before this change, there was no explicit if check on whether there was EXIF data available before moving the location picker map. After this change, an explicit if check (which checks the activity name string) will move the location picker map to either the EXIF location (if that data is available) or to the device's GPS location (if EXIF data is not available).
This commit is contained in:
parent
442ab08711
commit
97fa77deb8
1 changed files with 9 additions and 0 deletions
|
|
@ -329,6 +329,15 @@ public class LocationPickerActivity extends BaseActivity implements
|
||||||
|
|
||||||
private void setupMapView() {
|
private void setupMapView() {
|
||||||
requestLocationPermissions();
|
requestLocationPermissions();
|
||||||
|
|
||||||
|
//If EXIF data is available, move map to EXIF location.
|
||||||
|
if(activity.equals("UploadActivity")){
|
||||||
|
moveMapToMediaLocation();
|
||||||
|
} else {
|
||||||
|
//EXIF data is not available. Move map to device GPS location.
|
||||||
|
moveMapToGPSLocation();
|
||||||
|
}
|
||||||
|
|
||||||
modifyLocationButton.setOnClickListener(v -> onClickModifyLocation());
|
modifyLocationButton.setOnClickListener(v -> onClickModifyLocation());
|
||||||
removeLocationButton.setOnClickListener(v -> onClickRemoveLocation());
|
removeLocationButton.setOnClickListener(v -> onClickRemoveLocation());
|
||||||
showInMapButton.setOnClickListener(v -> showInMapApp());
|
showInMapButton.setOnClickListener(v -> showInMapApp());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue