mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 13:23:58 +01:00
Merge remote-tracking branch 'refs/remotes/origin/2.7.x-release'
This commit is contained in:
commit
a927a80265
1 changed files with 38 additions and 32 deletions
|
|
@ -54,11 +54,13 @@ public class NearbyController {
|
||||||
}
|
}
|
||||||
List<Place> places = nearbyPlaces.getFromWikidataQuery(curLatLng, Locale.getDefault().getLanguage());
|
List<Place> places = nearbyPlaces.getFromWikidataQuery(curLatLng, Locale.getDefault().getLanguage());
|
||||||
|
|
||||||
|
if (places.size() > 0) {
|
||||||
LatLng[] boundaryCoordinates = {places.get(0).location, // south
|
LatLng[] boundaryCoordinates = {places.get(0).location, // south
|
||||||
places.get(0).location, // north
|
places.get(0).location, // north
|
||||||
places.get(0).location, // west
|
places.get(0).location, // west
|
||||||
places.get(0).location};// east, init with a random location
|
places.get(0).location};// east, init with a random location
|
||||||
|
|
||||||
|
|
||||||
if (curLatLng != null) {
|
if (curLatLng != null) {
|
||||||
Timber.d("Sorting places by distance...");
|
Timber.d("Sorting places by distance...");
|
||||||
final Map<Place, Double> distances = new HashMap<>();
|
final Map<Place, Double> distances = new HashMap<>();
|
||||||
|
|
@ -90,6 +92,10 @@ public class NearbyController {
|
||||||
nearbyPlacesInfo.boundaryCoordinates = boundaryCoordinates;
|
nearbyPlacesInfo.boundaryCoordinates = boundaryCoordinates;
|
||||||
return nearbyPlacesInfo;
|
return nearbyPlacesInfo;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads attractions from location for list view, we need to return Place data type.
|
* Loads attractions from location for list view, we need to return Place data type.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue