Colormap variable substitution not working if multiple layers are provided in WMS call


The issue is related to cql expressions in the rastersymbolizer style element to make the color map dynamic as described here:

It works basically, but as soon as more than one layer are passed through the layers-parameter in a WMS call the cql parameters are ignored and the defined default values are applied.

As an example, the threshold1-parameter in the following WMS call is completely ignored because two layers are passed:

The issue was confirmed in the GeoServer user group:




Andrea Aime
February 15, 2017, 11:48 AM

Mass closing all resolved issues not modified in the last 4 weeks

Andrea Aime
July 22, 2016, 5:36 PM

Fixed at the very end of my "bug stomp" day, should work fine but I could use some checks. It should be in any geoserver nightly build dated July 23rd or successive:

Victor Sinceac
June 16, 2016, 3:06 PM

As remarked by Andrea, such a fix would also fix a related issue acting on SLD with multiple rules for RasterSymbolizer.
See full details in discussion

Mauro Bartolomeoli
June 15, 2016, 12:06 PM


Andrea Aime



Fix versions

Affects versions