Move destination:ref from our Ref to our Destination field (testing needed)
This commit is contained in:
parent
e46593dc03
commit
4c1e7586a1
1 changed files with 12 additions and 10 deletions
|
@ -108,9 +108,9 @@ public class RouteDataObject {
|
|||
}
|
||||
|
||||
public String getRef(boolean direction) {
|
||||
if (getDestinationRef(direction) != null) {
|
||||
return getDestinationRef(direction);
|
||||
}
|
||||
//if (getDestinationRef(direction) != null) {
|
||||
// return getDestinationRef(boolean direction);
|
||||
//}
|
||||
if (names != null) {
|
||||
return names.get(region.refTypeRule);
|
||||
}
|
||||
|
@ -144,6 +144,8 @@ public class RouteDataObject {
|
|||
}
|
||||
|
||||
public String getDestinationName(String lang, boolean transliterate, boolean direction){
|
||||
//Issue #3289: Treat destination:ref like a destination, not like a ref
|
||||
String destRef = (getDestinationRef(direction) == null) ? "" : getDestinationRef(direction);
|
||||
if(names != null) {
|
||||
int[] kt = names.keys();
|
||||
|
||||
|
@ -169,13 +171,13 @@ public class RouteDataObject {
|
|||
int k = kt[i];
|
||||
if(region.routeEncodingRules.size() > k) {
|
||||
if(!Algorithms.isEmpty(lang) && destinationTagLangFB.equals(region.routeEncodingRules.get(k).getTag())) {
|
||||
return (transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k);
|
||||
return destRef + ", " + ((transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k));
|
||||
}
|
||||
if(destinationTagFB.equals(region.routeEncodingRules.get(k).getTag())) {
|
||||
return (transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k);
|
||||
return destRef + ", " + ((transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k));
|
||||
}
|
||||
if(!Algorithms.isEmpty(lang) && destinationTagLang.equals(region.routeEncodingRules.get(k).getTag())) {
|
||||
return (transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k);
|
||||
return destRef + ", " + ((transliterate) ? Junidecode.unidecode(names.get(k)) : names.get(k));
|
||||
}
|
||||
if(destinationTagDefault.equals(region.routeEncodingRules.get(k).getTag())) {
|
||||
destinationDefault = names.get(k);
|
||||
|
@ -183,13 +185,13 @@ public class RouteDataObject {
|
|||
}
|
||||
}
|
||||
if(transliterate && destinationDefault != null) {
|
||||
return Junidecode.unidecode(destinationDefault);
|
||||
return destRef + ", " + Junidecode.unidecode(destinationDefault);
|
||||
}
|
||||
return destinationDefault;
|
||||
return destRef + ", " + destinationDefault;
|
||||
}
|
||||
return null;
|
||||
return "".equals(destRef) ? null : destRef;
|
||||
}
|
||||
|
||||
|
||||
public int getPoint31XTile(int i) {
|
||||
return pointsX[i];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue