Make inner class vaariables public to reach them out of package

This commit is contained in:
neslihanturan 2018-09-18 14:05:27 +03:00
parent fc41235d5f
commit 546e37275a

View file

@ -38,6 +38,7 @@ public class NearbyController {
this.prefs = prefs;
}
/**
* Prepares Place list to make their distance information update later.
*
@ -45,7 +46,7 @@ public class NearbyController {
* @return NearbyPlacesInfo a variable holds Place list without distance information
* and boundary coordinates of current Place List
*/
public NearbyPlacesInfo loadAttractionsFromLocation(LatLng curLatLng) throws IOException {
public NearbyPlacesInfo loadAttractionsFromLocation(LatLng curLatLng, boolean returnClosestResult) throws IOException {
Timber.d("Loading attractions near %s", curLatLng);
NearbyPlacesInfo nearbyPlacesInfo = new NearbyPlacesInfo();
@ -53,7 +54,7 @@ public class NearbyController {
if (curLatLng == null) {
return null;
}
List<Place> places = nearbyPlaces.getFromWikidataQuery(curLatLng, Locale.getDefault().getLanguage());
List<Place> places = nearbyPlaces.getFromWikidataQuery(curLatLng, Locale.getDefault().getLanguage(), returnClosestResult);
if (null != places && places.size() > 0) {
LatLng[] boundaryCoordinates = {places.get(0).location, // south
@ -162,7 +163,7 @@ public class NearbyController {
}
public class NearbyPlacesInfo {
List<Place> placeList; // List of nearby places
LatLng[] boundaryCoordinates; // Corners of nearby area
public List<Place> placeList; // List of nearby places
public LatLng[] boundaryCoordinates; // Corners of nearby area
}
}