// Skip layers that do not have multiple FeatureTypeStyles
if (!(layer instanceof StyleLayer)) {
continue;
}
StyleLayer styleLayer = (StyleLayer) layer;
if (styleLayer.getStyle().featureTypeStyles().size() < 2) continue;
// count how many lite feature type styles are active
int currCount = 0;
MapLayer mapLayer = new MapLayer(layer);
FeatureType ftype = mapLayer.getFeatureSource().getSchema();
for (FeatureTypeStyle fts : styleLayer.getStyle().featureTypeStyles()) {
if (isFeatureTypeStyleActive(ftype, fts)) {
// get applicable rules at the current scale
List[] splittedRules = splitRules(fts);
List ruleList = splittedRules[0];
List elseRuleList = splittedRules[1];