Using the graphic symbology to fill a polygon in GeoServer I can successfully display a polygon with a 'slash' overlay using the CSS below.

stroke: #999999;
stroke-width: 0.5;      
fill: #ffe599, symbol('shape://slash');

However when I try to preview the legend I get the notification.

Failed to build legend preview. Check to see if the style is valid.

however I have validated and displayed successfully. In the logs I find the exception:

2019-03-07 02:26:32,130 DEBUG [renderer.style] - fetching mark of name shape://slash

2019-03-07 02:26:32,130 WARN [wms.responses] - couldn't paint due to: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0

I've tried this with other symbols such as 'square' and 'shape://vertline' with similar errors. I've also tried reordering to see if it was a cascading problem but it doesn't look like it.


It looks like this is because I am attempting to use a fill colour on top of a symbol...

fill: #ffe599, symbol('shape://slash')


but either

fill: #ffe599


fill: symbol('shape://slash')


Am hoping there is a work around to fix this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.