Hi all,

By configuring <sld:OnlineResource xlink:type="simple" xlink:href="
<http://mysite.com/images/$%7Bgraphic%7D.svg>
http://localhost:8080/geoserver/styles/${graphic}.svg";
<http://mysite.com/images/$%7Bgraphic%7D.svg>/>map rendering works, but the
legend graphic fails. I do no see any reason to check for null values in
the attribute <graphic>. But I entered a PropertyIsNull check on the SLD
file, and the Legend Graphic still not working.

Kind regards

Julierme

On Wed, Jan 23, 2019 at 5:15 PM Julierme Pinheiro <
[email protected]> wrote:

> Dear Malena and Olyster.
>
> It is actually working with
> http://localhost:8080/geoserver/styles/${graphic}.svg. The reason I
> thought it was not working because I am facing the same issue on the legend
> graphic as Miles Jordan in here
> <http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/>:
>
> *This works great with one small caveat: GetLegendGraphic will not return
> a legend graphic. In order to make it work, you need to specify a default
> icon to use with an ElseFilter in your SLD.*
>
> *So your Rules should check to see if STATE_ABBR is null and if so display
> the default icon. i.e.*
>
> I need to figure out how to insert a if condition to check when the
> attribute <graphic> is null in order to have the legend working. The way it
> is, without the if condition , the legend just shows a long gray line.
>
> Any comment will be very appreciated.
>
>
> Kind regards
>
>
> Julierme
>
>
>
>
>
> On Wed, Jan 23, 2019 at 4:54 PM Julierme Pinheiro <
> [email protected]> wrote:
>
>> Hi Malena,
>>
>> Thank you very much for your reply.
>>
>> It does work for http://localhost:8080/geoserver/styles/rainy-7.svg
>>
>> but not for http://localhost:8080/geoserver/styles/${graphic}.svg
>>
>> Any additional comment will be very appreciated
>>
>> Kind regards
>>
>> Julierme
>>
>> On Wed, Jan 23, 2019 at 4:20 PM Malena Libman <[email protected]>
>> wrote:
>>
>>> Hi!
>>>
>>> Have you tried the full URI? Mine locally is:
>>> http://localhost:8082/geoserver/styles/filename.svg
>>>
>>> Cheers
>>>
>>> Malena
>>>
>>> El mié., 23 ene. 2019 a las 14:48, Julierme Pinheiro (<
>>> [email protected]>) escribió:
>>>
>>>> Dear all
>>>>
>>>> I am running [email protected] on an [email protected]. I have some *.svg
>>>> images stored in ./webapps/geoserver/data/styles/${graphic}.svg
>>>>
>>>> I have a postgres attribute table named <graphic> and it contains the
>>>> name of the images as: cloudy, rainy, snowy, sunny, day, night , etc
>>>>
>>>> My sld file does not make reference to any workspace. And I have tried
>>>> all the settings bellow to reach the images, but I have gotten no success:
>>>>
>>>> <sld:OnlineResource xlink:type="simple" xlink:href="${graphic}.svg"
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>/>
>>>>
>>>> <sld:OnlineResource xlink:type="simple" xlink:href=
>>>> "/var/lib/tomcat8/webapps/data/styles/
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>${graphic}.
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>svg"
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>/>
>>>>
>>>> <sld:OnlineResource xlink:type="simple" xlink:href=
>>>> "./webapps/geoserver/data/styles/
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>${graphic}.
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>svg"
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>/>
>>>>
>>>> <sld:OnlineResource xlink:type="simple"<sld:OnlineResource
>>>> xlink:type="simple" xlink:href="./data/styles/
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>${graphic}.
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>svg"
>>>> <http://mysite.com/images/$%7Bgraphic%7D.svg>/>
>>>>
>>>> Any comment on this matter will be very appreciated.
>>>>
>>>> Kind regards
>>>>
>>>> Julierme
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>
>>>
_______________________________________________
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


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

Reply via email to