mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-01 15:23:54 +01:00
LocationPickerActivity.java: fix "Show in Map App" bug
Once the "Show in Map App" button is pressed, the Map app will center on the current photo's EXIF location, if that data is available. If not, the map app will center on where the location picker's map is centered. Javadoc updated to reflect this small change.
This commit is contained in:
parent
93f1e1ec29
commit
c6a7a5ec48
1 changed files with 11 additions and 4 deletions
|
|
@ -364,12 +364,19 @@ public class LocationPickerActivity extends BaseActivity implements
|
|||
}
|
||||
|
||||
/**
|
||||
* Show the location in map app
|
||||
* Show the location in map app. Map will center on EXIF location, if available.
|
||||
*/
|
||||
public void showInMap() {
|
||||
Utils.handleGeoCoordinates(this,
|
||||
new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(),
|
||||
mapView.getMapCenter().getLongitude(), 0.0f));
|
||||
//Check to see if EXIF location data is available
|
||||
if(cameraPosition != null){
|
||||
Utils.handleGeoCoordinates(this,
|
||||
new fr.free.nrw.commons.location.LatLng(cameraPosition.getLatitude(),
|
||||
cameraPosition.getLongitude(), 0.0f));
|
||||
} else {
|
||||
Utils.handleGeoCoordinates(this,
|
||||
new fr.free.nrw.commons.location.LatLng(mapView.getMapCenter().getLatitude(),
|
||||
mapView.getMapCenter().getLongitude(), 0.0f));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue