Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
838f1a171e
3 changed files with 7 additions and 4 deletions
|
@ -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"
|
||||
|
||||
});
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue