getZoomlevelRangeWay method
Returns the widest possible zoomrange which may accept the given argument. Returns null if if the argument will never accepted.
Implementation
ZoomlevelRange? getZoomlevelRangeWay(Waypath waypath, List<Tag> tags) {
bool isClosedWay = waypath.isClosedWay();
ZoomlevelRange? result;
rulesList.forEach((rule) {
ZoomlevelRange? range = isClosedWay ? rule.getZoomlevelRangeClosedWay(tags) : rule.getZoomlevelRangeOpenWay(tags);
if (range != null) {
if (result == null) {
result = range;
} else {
result = result!.widenTo(range);
}
}
});
return result;
}