diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index 73b5c874dc..12a3728450 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -74,7 +74,7 @@ public class BinaryInspector { "-zoom=16", // "-bbox=1.74,51.17,1.75,51.16", // "-vstats", -// "/Users/victorshcherb/osmand/maps/Netherlands_europe_2.obf" +// "/Users/victorshcherb/osmand/maps/srtm/Netherlands_europe_2.srtm.obf" // "/Users/victorshcherb/osmand/maps/World_basemap_2.obf" }); diff --git a/OsmAnd-java/src/net/osmand/data/Amenity.java b/OsmAnd-java/src/net/osmand/data/Amenity.java index cc9cd573d9..72ac673e55 100644 --- a/OsmAnd-java/src/net/osmand/data/Amenity.java +++ b/OsmAnd-java/src/net/osmand/data/Amenity.java @@ -157,7 +157,7 @@ public class Amenity extends MapObject { setAdditionalInfo(PHONE, phone); } - public String getNameSelected(String lang) { + public String getNameSelected(String lang, String defLang) { if (lang != null) { String translateName; if (lang.equals("en")) { @@ -169,6 +169,9 @@ public class Amenity extends MapObject { return lang; } } + if(!Algorithms.isEmpty(getName())) { + return defLang; + } for (String nm : getAdditionalInfo().keySet()) { if (nm.startsWith("name:")) { return nm.substring("name:".length()); diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 367e53c615..d7397041e6 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -345,7 +345,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon if (a.getType().isWiki()) { // First choice to display wiki article in should be the selected OsmAnd locale (not the map display language) //showWiki(ctx, app, a, lang); - showWiki(ctx, app, a, app.getSettings().PREFERRED_LOCALE.get()); + showWiki(ctx, app, a, app.getSettings().MAP_PREFERRED_LOCALE.get()); } else { String d = OsmAndFormatter.getAmenityDescriptionContent(app, a, false); SpannableString spannable = new SpannableString(d); @@ -388,7 +388,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon topBar.setBackgroundColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); topBar.setTitleTextColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTextColor))); - String lng = a.getNameSelected(lang); + String lng = a.getNameSelected(lang, "en"); if(Algorithms.isEmpty(lng)) { lng = "en"; }