[Geoserver-users] SLD Parameter Substituion

Hello all,

I have an SLD taking in a coverage and applying a color ramp to it with a contour lines overlay. I have had the opacity for the color ramp set to a variable substitution parameter form the URL. Worked like a charm. I tried to make contour lines optional, so the user could optionally display them or not. Again, worked no problem. However, not the opacity doesn’t work. If I comment out the contour line substitution code the opacity works again, but only either/or.

My url:

wms?service=WMS&version=1.1.0&request=GetMap&layers=ecmop:t2m&styles=contour_conditional_test&bbox=-180.0625,-90.0625,179.9375,90.0625&width=659&height=330&srs=EPSG:4326&format=image%2Fpng&env=contour:false;opacity:1

My SLD (header, color ramp and contour details removed for size):

Temp-K Temperature (K) Temperature Color ramp opacity 1 ... data levels 220 ... 325 rule1 Contour Line contour false true #000000 1 value Arial Normal 10 2 #FFFFFF 0.6 #000000 2000 true 100 50 30

Am I missing something that I need to do to get this to work? Is it because I have
two feature styles?

  • Benjamin Shender