> > Hi to all, > after several attempts, I find this solution. > > In my getmap request I append this parameter: > > &env=gid-<gid1>:<gid1>;value-<gid1>:<value1>;gid-<gid2>:<gid2>;value-<gid2>:<value2>;.... > > And use this sld: > > <?xml version="1.0" encoding="UTF-8"?> > <StyledLayerDescriptor version="1.0.0" > xmlns="http://www.opengis.net/sld" > xmlns:ogc="http://www.opengis.net/ogc" > xmlns:xlink="http://www.w3.org/1999/xlink" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/sld > http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"> > > <NamedLayer> > <Name>DynamicStyle</Name> > <UserStyle> > <FeatureTypeStyle> > <Rule> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>gid</ogc:PropertyName> > <ogc:Function name="env"> > <ogc:Function name="Concatenate"> > <ogc:Literal>gid-</ogc:Literal> > <ogc:PropertyName>gid</ogc:PropertyName> > </ogc:Function> > </ogc:Function> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <PolygonSymbolizer> > <Fill> > <CssParameter name="fill"> > <ogc:Function name="Interpolate"> > <ogc:PropertyName> > <ogc:Function name="env"> > <ogc:Function > name="Concatenate"> > > <ogc:Literal>value-</ogc:Literal> > > <ogc:PropertyName>gid</ogc:PropertyName> > </ogc:Function> > </ogc:Function> > </ogc:PropertyName> > > <ogc:Literal>0</ogc:Literal> > <ogc:Literal>#ffffb2</ogc:Literal> > > <ogc:Literal>5</ogc:Literal> > <ogc:Literal>#fed976</ogc:Literal> > > <ogc:Literal>10</ogc:Literal> > <ogc:Literal>#feb24c</ogc:Literal> > > <ogc:Literal>25</ogc:Literal> > <ogc:Literal>#fd8d3c</ogc:Literal> > > <ogc:Literal>50</ogc:Literal> > <ogc:Literal>#fc4e2a</ogc:Literal> > > <ogc:Literal>75</ogc:Literal> > <ogc:Literal>#e31a1c</ogc:Literal> > > <ogc:Literal>100</ogc:Literal> > <ogc:Literal>#b10026</ogc:Literal> > > <ogc:Literal>color</ogc:Literal> > > </ogc:Function> > </CssParameter> > </Fill> > </PolygonSymbolizer> > </Rule> > <Rule> > <ogc:Filter> > <ogc:PropertyIsEqualTo> > <ogc:PropertyName>cod_reg</ogc:PropertyName> > <ogc:Literal>16</ogc:Literal> > </ogc:PropertyIsEqualTo> > </ogc:Filter> > <LineSymbolizer> > <Stroke> > <CssParameter > name="stroke">#dddddd</CssParameter> > </Stroke> > </LineSymbolizer> > </Rule> > </FeatureTypeStyle> > </UserStyle> > </NamedLayer> > </StyledLayerDescriptor> >
_______________________________________________ Geoserver-users mailing list
Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users