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",
|
"-zoom=16",
|
||||||
// "-bbox=1.74,51.17,1.75,51.16",
|
// "-bbox=1.74,51.17,1.75,51.16",
|
||||||
// "-vstats",
|
// "-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"
|
// "/Users/victorshcherb/osmand/maps/World_basemap_2.obf"
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class Amenity extends MapObject {
|
||||||
setAdditionalInfo(PHONE, phone);
|
setAdditionalInfo(PHONE, phone);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNameSelected(String lang) {
|
public String getNameSelected(String lang, String defLang) {
|
||||||
if (lang != null) {
|
if (lang != null) {
|
||||||
String translateName;
|
String translateName;
|
||||||
if (lang.equals("en")) {
|
if (lang.equals("en")) {
|
||||||
|
@ -169,6 +169,9 @@ public class Amenity extends MapObject {
|
||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!Algorithms.isEmpty(getName())) {
|
||||||
|
return defLang;
|
||||||
|
}
|
||||||
for (String nm : getAdditionalInfo().keySet()) {
|
for (String nm : getAdditionalInfo().keySet()) {
|
||||||
if (nm.startsWith("name:")) {
|
if (nm.startsWith("name:")) {
|
||||||
return nm.substring("name:".length());
|
return nm.substring("name:".length());
|
||||||
|
|
|
@ -345,7 +345,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
|
||||||
if (a.getType().isWiki()) {
|
if (a.getType().isWiki()) {
|
||||||
// First choice to display wiki article in should be the selected OsmAnd locale (not the map display language)
|
// 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, lang);
|
||||||
showWiki(ctx, app, a, app.getSettings().PREFERRED_LOCALE.get());
|
showWiki(ctx, app, a, app.getSettings().MAP_PREFERRED_LOCALE.get());
|
||||||
} else {
|
} else {
|
||||||
String d = OsmAndFormatter.getAmenityDescriptionContent(app, a, false);
|
String d = OsmAndFormatter.getAmenityDescriptionContent(app, a, false);
|
||||||
SpannableString spannable = new SpannableString(d);
|
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.setBackgroundColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTabBackground)));
|
||||||
topBar.setTitleTextColor(ctx.getResources().getColor(getResIdFromAttribute(ctx, R.attr.pstsTextColor)));
|
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)) {
|
if(Algorithms.isEmpty(lng)) {
|
||||||
lng = "en";
|
lng = "en";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue