Merge branch 'master' of https://github.com/osmandapp/Osmand
This commit is contained in:
commit
f36ad08286
1 changed files with 2 additions and 1 deletions
|
@ -371,8 +371,9 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC
|
||||||
searchEditText.setHint(R.string.search_poi_category_hint);
|
searchEditText.setHint(R.string.search_poi_category_hint);
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
double d = MapUtils.getDistance(clt, location.getLatitude(), location.getLongitude());
|
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());
|
centerLatLon = new LatLon(location.getLatitude(), location.getLongitude());
|
||||||
|
} else {
|
||||||
String n = getString(R.string.search_poi_category_hint);
|
String n = getString(R.string.search_poi_category_hint);
|
||||||
String dist = OsmAndFormatter.getFormattedDistance((float) d, mapActivity.getMyApplication());
|
String dist = OsmAndFormatter.getFormattedDistance((float) d, mapActivity.getMyApplication());
|
||||||
searchEditText.setHint(n +", " + getString(R.string.dist_away_from_my_location, dist));
|
searchEditText.setHint(n +", " + getString(R.string.dist_away_from_my_location, dist));
|
||||||
|
|
Loading…
Reference in a new issue