Merge remote-tracking branch 'refs/remotes/origin/2.7.x-release'

This commit is contained in:
misaochan 2018-03-28 22:25:57 +10:00
commit a927a80265

View file

@ -54,11 +54,13 @@ public class NearbyController {
}
List<Place> places = nearbyPlaces.getFromWikidataQuery(curLatLng, Locale.getDefault().getLanguage());
if (places.size() > 0) {
LatLng[] boundaryCoordinates = {places.get(0).location, // south
places.get(0).location, // north
places.get(0).location, // west
places.get(0).location};// east, init with a random location
if (curLatLng != null) {
Timber.d("Sorting places by distance...");
final Map<Place, Double> distances = new HashMap<>();
@ -90,6 +92,10 @@ public class NearbyController {
nearbyPlacesInfo.boundaryCoordinates = boundaryCoordinates;
return nearbyPlacesInfo;
}
else {
return null;
}
}
/**
* Loads attractions from location for list view, we need to return Place data type.