[Quick search] added folder for house city
This commit is contained in:
parent
5a8bb986be
commit
b603812edd
1 changed files with 11 additions and 10 deletions
|
@ -191,29 +191,30 @@ public abstract class QuickSearchListFragment extends OsmAndListFragment {
|
||||||
pointDescription = fav.getPointDescription();
|
pointDescription = fav.getPointDescription();
|
||||||
break;
|
break;
|
||||||
case HOUSE:
|
case HOUSE:
|
||||||
String nm = searchResult.localeName;
|
String typeNameHouse = null;
|
||||||
|
String name = searchResult.localeName;
|
||||||
if (searchResult.relatedObject instanceof City) {
|
if (searchResult.relatedObject instanceof City) {
|
||||||
nm = ((City) searchResult.relatedObject).getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true) + " " + nm;
|
name = ((City) searchResult.relatedObject).getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true) + " " + name;
|
||||||
} else if (searchResult.relatedObject instanceof Street) {
|
} else if (searchResult.relatedObject instanceof Street) {
|
||||||
String s = ((Street) searchResult.relatedObject).getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true);
|
String s = ((Street) searchResult.relatedObject).getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true);
|
||||||
String c = ((Street) searchResult.relatedObject).getCity().getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true);
|
typeNameHouse = ((Street) searchResult.relatedObject).getCity().getName(searchResult.requiredSearchPhrase.getSettings().getLang(), true);
|
||||||
nm = s + " " + nm + ", " + c;
|
name = s + " " + name;
|
||||||
} else if (searchResult.localeRelatedObjectName != null) {
|
} else if (searchResult.localeRelatedObjectName != null) {
|
||||||
nm = searchResult.localeRelatedObjectName + " " + nm;
|
name = searchResult.localeRelatedObjectName + " " + name;
|
||||||
}
|
}
|
||||||
pointDescription = new PointDescription(PointDescription.POINT_TYPE_ADDRESS, nm);
|
pointDescription = new PointDescription(PointDescription.POINT_TYPE_ADDRESS, typeNameHouse, name);
|
||||||
break;
|
break;
|
||||||
case LOCATION:
|
case LOCATION:
|
||||||
LatLon latLon = (LatLon) object;
|
LatLon latLon = (LatLon) object;
|
||||||
pointDescription = new PointDescription(latLon.getLatitude(), latLon.getLongitude());
|
pointDescription = new PointDescription(latLon.getLatitude(), latLon.getLongitude());
|
||||||
break;
|
break;
|
||||||
case STREET_INTERSECTION:
|
case STREET_INTERSECTION:
|
||||||
String typeName = QuickSearchListItem.getTypeName(app, searchResult);
|
String typeNameIntersection = QuickSearchListItem.getTypeName(app, searchResult);
|
||||||
if (Algorithms.isEmpty(typeName)) {
|
if (Algorithms.isEmpty(typeNameIntersection)) {
|
||||||
typeName = null;
|
typeNameIntersection = null;
|
||||||
}
|
}
|
||||||
pointDescription = new PointDescription(PointDescription.POINT_TYPE_ADDRESS,
|
pointDescription = new PointDescription(PointDescription.POINT_TYPE_ADDRESS,
|
||||||
typeName, QuickSearchListItem.getName(app, searchResult));
|
typeNameIntersection, QuickSearchListItem.getName(app, searchResult));
|
||||||
break;
|
break;
|
||||||
case WPT:
|
case WPT:
|
||||||
GPXUtilities.WptPt wpt = (GPXUtilities.WptPt) object;
|
GPXUtilities.WptPt wpt = (GPXUtilities.WptPt) object;
|
||||||
|
|
Loading…
Reference in a new issue