Add title 10km away

This commit is contained in:
Victor Shcherb 2016-07-25 10:28:55 +02:00
parent da4a27195e
commit 91fafa1e28

View file

@ -355,8 +355,9 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
searchEditText.setHint(R.string.search_poi_category_hint);
if (location != null) {
double d = MapUtils.getDistance(clt, location.getLatitude(), location.getLongitude());
if(MapUtils.getDistance(clt, location.getLatitude(), location.getLongitude()) < DISTANCE_THRESHOLD) {
if(d < DISTANCE_THRESHOLD) {
centerLatLon = new LatLon(location.getLatitude(), location.getLongitude());
} else {
String n = getString(R.string.search_poi_category_hint);
String dist = OsmAndFormatter.getFormattedDistance((float) d, mapActivity.getMyApplication());
searchEditText.setHint(n +", " + getString(R.string.dist_away_from_my_location, dist));