I need to chage layer style depending on attribute value on wms call. Like this
<Fill>
<CssParameter name="fill">
<ogc:Function name="Recode">
<!-- Value to transform -->
<ogc:Function name="strTrim">
<ogc:PropertyName>ward_no</ogc:PropertyName>
</ogc:Function>
<!-- Map of input to output values -->
<ogc:Literal>28</ogc:Literal>
<ogc:Literal>#6495ED</ogc:Literal>
<ogc:Literal>10</ogc:Literal>
<ogc:Literal>#B0C4DE</ogc:Literal>
<ogc:Literal>6</ogc:Literal>
<ogc:Literal>#F5DEB3</ogc:Literal>
<ogc:Literal>11</ogc:Literal>
<ogc:Literal>#F4A460</ogc:Literal>
<ogc:Literal>14</ogc:Literal>
<ogc:Literal>#87CEEB</ogc:Literal>
</ogc:Function>
</CssParameter>
</Fill>
But the attribute value [28,10,6,11,14] cal also be change dynamically. By using ENV value I can change color of each and every attribute, like this
<ogc:Function name="property">
<ogc:Function name="env">
<ogc:Literal>28</ogc:Literal>
<ogc:Literal>#6495ED</ogc:Literal>
</ogc:Function>
</ogc:Function>
But how to change all input attribute? Or is their any way to create a attribute based style on wms call??
The attribute value list can also increase or decrease also depending on request