Using variable substitution and static values inside OnlineResource href

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using variable substitution and static values inside OnlineResource href

GeoServer - User mailing list
Hi all,

I am trying to show a svg over some features. The end user should choose
which svg to display and send svg name through WMS requests into my sld
file. If no filename provided, a default one should render. All available
svg files are inside geoserver data dir.

What I achieved so far is:

/<ExternalGraphic>
        <OnlineResource xlink:type="simple" xlink:href="${env('chosen-icon',
icon)}"/>    
        <Format>image/svg+xml</Format>                
</ExternalGraphic>
/

This means that if 'chosen-icon' is not provided, the default svg name is
read from icon (which in my case is a layer attribute). Instead of using a
layer attribuite, I would like to write there a static value for the
filename. Like: /xlink:href="${env('chosen-icon',
'disability_accessibility.svg')}"/. But this is not working.

Does anyone have any suggestions?

Thanks!







--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Using variable substitution and static values inside OnlineResource href

Olyster
Hi,

what do you see in the log file (in verbose mode) with the static value ?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Using variable substitution and static values inside OnlineResource href

GeoServer - User mailing list
This solution actually works. In the original code I forgot to put the
default filename between quotes. Silly mistake!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users