return backgroundColorOverride;
}
@Override
public void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed) {
Environment env = new Environment(osm, mc, null, this);
MapCSSRuleIndex matchingRuleIndex;
if (osm instanceof Node) {
matchingRuleIndex = nodeRules;
} else if (osm instanceof Way) {
if (osm.isKeyFalse("area")) {
matchingRuleIndex = wayNoAreaRules;
} else {
matchingRuleIndex = wayRules;
}
} else {
if (((Relation) osm).isMultipolygon()) {
matchingRuleIndex = multipolygonRules;
} else if (osm.hasKey("#canvas")) {
matchingRuleIndex = canvasRules;
} else {
matchingRuleIndex = relationRules;
}
}
// the declaration indices are sorted, so it suffices to save the
// last used index
int lastDeclUsed = -1;
for (MapCSSRule r : matchingRuleIndex.getRuleCandidates(osm)) {
env.clearSelectorMatchingInformation();
env.layer = r.selector.getSubpart();
if (r.selector.matches(env)) { // as side effect env.parent will be set (if s is a child selector)
Selector s = r.selector;
if (s.getRange().contains(scale)) {
mc.range = Range.cut(mc.range, s.getRange());