From 272a62ab092fd6e7046263d84b20fe78afeebbf5 Mon Sep 17 00:00:00 2001 From: Chumva Date: Thu, 22 Mar 2018 14:05:06 +0200 Subject: [PATCH] added ref as part of name --- .../controllers/AmenityMenuController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java index 07b29991c5..4e738c7ca4 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/controllers/AmenityMenuController.java @@ -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 additionalInfo = amenity.getAdditionalInfo(); + if (additionalInfo != null) { + String ref = additionalInfo.get("ref"); + if (ref != null && !ref.isEmpty()) { + return name + " (" + ref + ")"; + } + } + return name; } @Override