| The raster legend border colour is ignored. In class org.geoserver.wms.legendgraphic.RasterLayerLegendHelper the method parseRequest() creates all the necessary objects with the correct legend configuration.
private void parseRequest(final GetLegendGraphicRequest request,Style gt2Style,String ruleName) {
...
cmapLegendBuilder.setAdditionalOptions(request.getLegendOptions());
...
final ColorMapEntry[] colorMapEntries = cmap.getColorMapEntries();
ColorMapEntryLegendBuilder lastEntry = null;
boolean first = true;
for (ColorMapEntry ce : colorMapEntries) {
if(ce == null) {
continue;
}
final Double qty = ce.getQuantity().evaluate(null, Double.class);
if(cmap.getType() == ColorMap.TYPE_INTERVALS && first && qty < 0 && Double.isInfinite(qty)) {
continue;
}
lastEntry = cmapLegendBuilder.addColorMapEntry(ce);
first = false;
}
if(lastEntry != null) {
lastEntry.setLastRow();
}
cmapLegendBuilder.checkAdditionalOptions();
}
The following line creates all the necessary raster legend with configuration:
lastEntry = cmapLegendBuilder.addColorMapEntry(ce);
However the border colour is not available until the following line is called:
cmapLegendBuilder.checkAdditionalOptions();
This is after the colour entry objects are created hence the border colours are always black. |