diff --git a/OsmAnd/src/net/osmand/data/PointDescription.java b/OsmAnd/src/net/osmand/data/PointDescription.java index 9082f007ed..4fb7a0d90a 100644 --- a/OsmAnd/src/net/osmand/data/PointDescription.java +++ b/OsmAnd/src/net/osmand/data/PointDescription.java @@ -76,6 +76,13 @@ public class PointDescription { if (isLocation()) { return getLocationName(ctx, lat, lon, true).replace('\n', ' '); } + if (!Algorithms.isEmpty(typeName)) { + if (Algorithms.isEmpty(name)) { + return typeName; + } else { + return typeName.trim() + ": " + name; + } + } return name; } @@ -174,7 +181,9 @@ public class PointDescription { public static String getSimpleName(LocationPoint o, Context ctx) { - return o.getPointDescription(ctx).getFullPlainName(ctx, o.getLatitude(), o.getLongitude()); + PointDescription pd = o.getPointDescription(ctx); + return pd.getSimpleName(ctx, o.getLatitude(), o.getLongitude()); +// return o.getPointDescription(ctx).getFullPlainName(ctx, o.getLatitude(), o.getLongitude()); } public static String serializeToString(PointDescription p) {