// prepare the style for this layer
simplified = getSimplifiedStyle(mapContent, layer);
}
private Style getSimplifiedStyle(WMSMapContent mc, Layer layer) {
ScaleStyleVisitor visitor = new ScaleStyleVisitor(mc.getScaleDenominator(),
(SimpleFeatureType) layer.getFeatureSource().getSchema());
try {
layer.getStyle().accept(visitor);
return (Style) visitor.getCopy();
} catch (EmptyStackException e) {
return null;
}
}