May I set variable in CSS, like as
<ogc:Function name="env">
I have this:
* {
fill: [recode(strTrim(name),
'Akmola Region', '#6495ED',
'Aktobe Region', '#B0C4DE')];
fill-opacity:0.4;
stroke: lightgrey;
}
but I want set variables for Fill and Stroke-width parameters. Like this:
<Rule>
<Title>Akmola Region</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>Akmola Region</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">
#<ogc:Function name="env">
<ogc:Literal>Akmola_fill_color</ogc:Literal>
<ogc:Literal>6495ED</ogc:Literal>
</ogc:Function>
</CssParameter>
<CssParameter name="fill-opacity">0.4</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#605f5f</CssParameter>
<CssParameter name="stroke-width">
<ogc:Function name="env">
<ogc:Literal>Akmola_stroke_width</ogc:Literal>
<ogc:Literal>0.1</ogc:Literal>
</ogc:Function>
</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
<Rule>
<Title>Aktobe Region</Title>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>name</ogc:PropertyName>
<ogc:Literal>Aktobe Region</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">
#<ogc:Function name="env">
<ogc:Literal>Aktobe_fill_color</ogc:Literal>
<ogc:Literal>B0C4DE</ogc:Literal>
</ogc:Function>
</CssParameter>
<CssParameter name="fill-opacity">0.4</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#605f5f</CssParameter>
<CssParameter name="stroke-width">
<ogc:Function name="env">
<ogc:Literal>Aktobe_stroke_width</ogc:Literal>
<ogc:Literal>0.1</ogc:Literal>
</ogc:Function>
</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
I want emulate hover event when mouse hover on map object. Maybe it is possible with css capabilities?