matchForZoomlevel method
Rule?
matchForZoomlevel(
- int zoomlevel
)
Implementation
Rule? matchForZoomlevel(int zoomlevel) {
if (!matchesForZoomLevel(zoomlevel)) {
return null;
}
List<Rule> subs = [];
subRules.forEach((element) {
Rule? sub = element.matchForZoomlevel(zoomlevel);
if (sub != null) subs.add(sub);
});
ShapeInstructions shapeInstructions = (instructions as InstructionInstructions).createShapeInstructions(zoomlevel);
if (shapeInstructions.isEmpty() && subs.isEmpty) return null;
Rule rule = createRule(subs, shapeInstructions);
return rule;
}