From 91fafa1e28f1bb8407344afb44fc0cdeda748ea8 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 25 Jul 2016 10:28:55 +0200 Subject: [PATCH] Add title 10km away --- .../src/net/osmand/plus/search/QuickSearchDialogFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index 859f5be47d..c16be6ef0d 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -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));