added ref as part of name

This commit is contained in:
Chumva 2018-03-22 14:05:06 +02:00
parent 2e3ab26c85
commit 272a62ab09

View file

@ -136,9 +136,17 @@ public class AmenityMenuController extends MenuController {
@Override
public String getNameStr() {
return amenity.getName(
String name = amenity.getName(
amenity.getType().isWiki() ? getPreferredMapAppLang() : getPreferredMapLang(),
isTransliterateNames());
Map<String, String> additionalInfo = amenity.getAdditionalInfo();
if (additionalInfo != null) {
String ref = additionalInfo.get("ref");
if (ref != null && !ref.isEmpty()) {
return name + " (" + ref + ")";
}
}
return name;
}
@Override