diff --git a/Sources/Controllers/TargetMenu/Search/OAQuickSearchListItem.mm b/Sources/Controllers/TargetMenu/Search/OAQuickSearchListItem.mm index 6c064ad865..38d284bdf2 100644 --- a/Sources/Controllers/TargetMenu/Search/OAQuickSearchListItem.mm +++ b/Sources/Controllers/TargetMenu/Search/OAQuickSearchListItem.mm @@ -338,6 +338,11 @@ + (NSString *) getTypeName:(OASearchResult *)searchResult { OAPOI *poi = (OAPOI *) searchResult.object; NSString * subType = [poi getSubTypeStr]; + NSString * city = poi.cityName; + if ([city length] > 0) + { + subType = [subType stringByAppendingFormat:@" • %@", city]; + } return [[self.class getName:searchResult] isEqualToString:subType] ? @"" : subType; } case LOCATION: diff --git a/Sources/POI/OAPOI.h b/Sources/POI/OAPOI.h index c0ba49e2ed..0c46565943 100644 --- a/Sources/POI/OAPOI.h +++ b/Sources/POI/OAPOI.h @@ -81,6 +81,7 @@ @property (nonatomic) OAPOIRoutePoint *routePoint; @property (nonatomic) NSString *mapIconName; +@property (nonatomic) NSString *cityName; - (UIImage *)icon; - (NSString *)iconName; diff --git a/Sources/POI/OAPOIHelper.mm b/Sources/POI/OAPOIHelper.mm index 3f6011c68f..bb57168560 100644 --- a/Sources/POI/OAPOIHelper.mm +++ b/Sources/POI/OAPOIHelper.mm @@ -1455,12 +1455,14 @@ + (OAPOI *) parsePOIByAmenity:(const std::shared_ptr &)am return nil; OsmAnd::LatLon latLon = OsmAnd::Utilities::convert31ToLatLon(amenity->position31); + NSString *lang = [OAAppSettings sharedManager].settingPrefMapLanguage.get; OAPOI *poi = [[OAPOI alloc] init]; poi.obfId = amenity->id; poi.latitude = latLon.latitude; poi.longitude = latLon.longitude; poi.name = amenity->nativeName.toNSString(); + poi.cityName = amenity->getCityFromTagGroups(QString::fromNSString(lang)).toNSString(); NSMutableDictionary *names = [NSMutableDictionary dictionary]; NSString *nameLocalized = [OAPOIHelper processLocalizedNames:amenity->localizedNames nativeName:amenity->nativeName names:names];