On Tue, Oct 9, 2012 at 10:02 AM, Swärd Mårten <[email protected]> wrote:
> Hi folks!****
>
> ** **
>
> I’m trying to use variable substitution with the GetLegend-request
> (Geoserver 2.1.3) but I can’t get it to work as I want to..****
>
> ** **
>
> What I’m trying to do is to change the title of a rule depending on what
> limits I’m sending in, but I can’t get anything out from it..****
>
> <Rule>
> <Name>First</Name>
> <Title>
> <ogc:Function name="env">
> <ogc:Literal>limit1</ogc:Literal>
> <ogc:Literal>default title 1</ogc:Literal>
> </ogc:Function>
> </Title>
> <ogc:Filter>
> <ogc:PropertyIsLessThanOrEqualTo>
> <ogc:PropertyName>varde</ogc:PropertyName>
> <ogc:Function name="env">
> <ogc:Literal>limit1</ogc:Literal>
> </ogc:Function>
> </ogc:PropertyIsLessThanOrEqualTo>
> </ogc:Filter>
> <PolygonSymbolizer>
> <Fill>
> <CssParameter name="fill">#FFFEBC</CssParameter>
> </Fill>
> </PolygonSymbolizer>
> </Rule>****
>
> ** **
>
> If I validate the SLD then I get the following error:****
>
> “ Element 'Title' is a simple type, so it must have no element
> information item [children].”****
>
> ** **
>
> Is it not possible to change the title with variable substitution?
>
Nope, it works only in elements where the SLD standard allows for an
Expression, title is not one
of them.
It would be possible to make that work as an extension, but it would
require changes to the
geotools api: not immediate and something that can be done only in the
unstable series
(that said, definitely doable imho).
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users