Yes, this functionality is unavailable for vendoroptions (Functions in
general do not work for vendor options).  As a workaround, you could provide
several variants of your style and refer to them by name, or use the
SLD_BODY or SLD (url to an SLD) query parameters to provide dynamically
generated SLDs from outside of GeoServer.

--
David Winslow
OpenGeo - http://opengeo.org/

On Fri, Nov 5, 2010 at 12:06 PM, Jeremy HANOUN
<[email protected]>wrote:

> Hi Guys,
>
> I'm pretty new in GIS Area and already have a question.
>
> I'm currently testing the v2.0.2 of GeoServer and tried parameter
> substitution.
>
> I succeed to use it according to the documentation on some part like
> CssParameter in Font and Fill section, Radius in Halo section, but I failed
> using it in VendorOption section. I wanted to dynamically set the
> spaceAround parameter. Here follows significative parts of my SLD.
>
> [...]
> <TextSymbolizer>
>  [...]
>  <Font>
>    <CssParameter name="font-family">
>      <ogc:Function name="env">
>        <ogc:Literal>TownNameFont1</ogc:Literal>
>        <ogc:Literal>Arial</ogc:Literal>
>      </ogc:Function>
>    </CssParameter>
>    <CssParameter name="font-size">
>      <ogc:Function name="env">
>        <ogc:Literal>TownNameSize1</ogc:Literal>
>        <ogc:Literal>12</ogc:Literal>
>      </ogc:Function>
>    </CssParameter>
>    <CssParameter name="font-style">normal</CssParameter>
>    <CssParameter name="font-weight">normal</CssParameter>
>  </Font>
>  [...]
>  <Halo>
>    <Radius>
>      <ogc:Literal>
>        <ogc:Function name="env">
>          <ogc:Literal>TownNameHaloSize1</ogc:Literal>
>          <ogc:Literal>2</ogc:Literal>
>        </ogc:Function>
>      </ogc:Literal>
>    </Radius>
>    <Fill>
>      <CssParameter name="fill">
>        <ogc:Function name="env">
>          <ogc:Literal>TownNameHaloFill1</ogc:Literal>
>          <ogc:Literal>#FFFFFF</ogc:Literal>
>        </ogc:Function>
>      </CssParameter>
>    </Fill>
>  </Halo>
>  <Fill>
>    <CssParameter name="fill">
>      <ogc:Function name="env">
>        <ogc:Literal>TownNameFill1</ogc:Literal>
>        <ogc:Literal>#000000</ogc:Literal>
>      </ogc:Function>
>    </CssParameter>
>  </Fill>
>  <Priority>
>    <ogc:PropertyName>pop</ogc:PropertyName>
>  </Priority>
>  <VendorOption name="conflictResolution">true</VendorOption>
>  <VendorOption name="spaceAround">
>    <ogc:Function name="env">
>      <ogc:Literal>TownNameSpaceAround1</ogc:Literal>
>      <ogc:Literal>12</ogc:Literal>
>    </ogc:Function>
>  </VendorOption>
> </TextSymbolizer>
> [...]
>
> Is this functionality unavailable on VendorOption or am I doing something
> wrong ?
>
> Thanks in advance.
>
> Cheers,
>
> --
> Jérémy Hanoun
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to