Update rendering additional

This commit is contained in:
Victor Shcherb 2015-01-08 01:15:47 +01:00
parent e29b1ed6a7
commit 356773d6ff

View file

@ -3,6 +3,7 @@ package net.osmand.render;
import net.osmand.PlatformUtil;
import net.osmand.binary.BinaryMapDataObject;
import net.osmand.binary.BinaryMapIndexReader.TagValuePair;
import org.apache.commons.logging.Log;
@ -283,16 +284,27 @@ public class RenderingRuleProperty {
return val != null && val.equals(val2);
}
int i = val.indexOf('=');
if (i != -1) {
String ts = val.substring(0, i);
String vs = val.substring(i + 1);
int k = val.indexOf('=');
if (k != -1) {
String ts = val.substring(0, k);
String vs = val.substring(k + 1);
Integer ruleInd = req.getObject().getMapIndex().getRule(ts, vs);
if (ruleInd != null) {
if (req.getObject().containsAdditionalType(ruleInd)) {
return true;
}
}
} else {
String ts = val.substring(0, k);
if (ts != null) {
int[] additionalTypes = obj.getAdditionalTypes();
for (int i = 0; i < additionalTypes.length; i++) {
TagValuePair vp = obj.getMapIndex().decodeType(additionalTypes[i]);
if (vp != null && ts.equals(vp.tag)) {
return true;
}
}
}
}
return false;
}