shield fix

This commit is contained in:
Dmitriy Ruban 2019-12-12 13:55:14 +02:00
parent 55db01e9b4
commit f712e1fba6
2 changed files with 12 additions and 6 deletions

View file

@ -746,7 +746,9 @@ public class RouteDataObject {
int sz = types.length;
for (int i = 0; i < sz; i++) {
RouteTypeRule r = region.quickGetEncodingRule(types[i]);
if (r.getTag().equals("road_shield_color_1")) {
if (r.getTag().equals("road_shield_color_1")
|| r.getTag().equals("road_shield_color_2")
|| r.getTag().equals("road_shield_color_3")) {
return r.getValue();
}
}
@ -757,7 +759,9 @@ public class RouteDataObject {
int sz = types.length;
for (int i = 0; i < sz; i++) {
RouteTypeRule r = region.quickGetEncodingRule(types[i]);
if (r.getTag().equals("road_shield_shape_1")) {
if (r.getTag().equals("road_shield_shape_1")
|| r.getTag().equals("road_shield_shape_2")
|| r.getTag().equals("road_shield_shape_3")) {
return r.getValue();
}
}

View file

@ -339,10 +339,12 @@ public class RouteCalculationResult {
if (segmentRef != null && segmentRef.equals(shieldName)) {
String shieldColor = segment.getObject().getShieldColor();
String shieldShape = segment.getObject().getShieldShape();
if (shieldColor != null && shieldShape != null) {
exitInfo.setShieldIconName(shieldColor + "_" + shieldShape + "_"
+ shieldName.length() + "_" + "road_shield");
// we found it
if (shieldColor != null || shieldShape != null) {
exitInfo.setShieldIconName((shieldColor != null ? shieldColor : "white")
+ "_"
+ (shieldShape != null ? shieldShape : "square")
+ "_"
+ shieldName.length() + "_" + "road_shield");
break;
}
}