Hi Eleanor,
when you do a GetLengedGraphic request the wms_scale_denominator value is
null, and everything
goes belly up from there, the overall resulting size is likely 0 or null.
The env function accepts a second literal, which would be the default value
in case the variable is not found,
try adding one.

As an alternative, you could see what happens if you avoid doing scale math
and just set the icon size in
ground units, see:
http://docs.geoserver.org/stable/en/user/styling/sld/extensions/uom.html#specifying-symbolizer-sizes-in-ground-units

Cheers
Anderea


On Fri, May 4, 2018 at 10:11 AM, Michie, Eleanor <
eleanor.mic...@salford.gov.uk> wrote:

> Dear All
>
>
>
> I have a style which uses the scale to determine the icon size (see
> below). This previously worked fine. However, recently it has stopped
> working and does not generate a legend graphic properly (shows text, in
> this case ‘star’, but no icons). To be clear, it is only the legend that is
> the problem, on the map the style still works.
>
>
>
> <NamedLayer>
>
> <Name>star</Name>
>
>   <UserStyle>
>
>     <FeatureTypeStyle>
>
>       <Rule>
>
>         <Name>star</Name>
>
>           <PointSymbolizer>
>
>             <Graphic>
>
>               <Mark>
>
>                 <WellKnownName>star</WellKnownName>
>
>                 <Fill>
>
>                   <CssParameter name="fill">#00ff00</CssParameter>
>
>                 </Fill>
>
>               </Mark>
>
>               <Size>
>
>                 <ogc:Add>
>
>                   <ogc:Mul>
>
>                     <ogc:Function name="env">
>
>                       <ogc:Literal>wms_scale_denominator</ogc:Literal>
>
>                     </ogc:Function>
>
>                     <ogc:Literal>-0.00001</ogc:Literal>
>
>                   </ogc:Mul>
>
>                   <ogc:Literal>20</ogc:Literal>
>
>                 </ogc:Add>
>
>               </Size>
>
>             </Graphic>
>
>           </PointSymbolizer>
>
>         </Rule>
>
>      </FeatureTypeStyle>
>
>   </UserStyle>
>
> </NamedLayer>
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Many thanks
>
> Eleanor Michie
>
>
>
>
> DISCLAIMER: The information contained in this communication/message from
> eleanor.mic...@salford.gov.uk is confidential. It is intended solely for
> the addressee(s) Access to this message by anyone else is unauthorised. If
> you are not the intended recipient, any disclosure, copying, or
> distribution of the message, or any action or omission taken by you in
> reliance on it, is prohibited and may be unlawful. As a public body,
> Salford City Council may be required to disclose this email [or any
> response to it] under the Freedom of Information Act 2000, unless the
> information in it is covered by one of the exemptions in the Act. Please
> immediately contact the sender if you have received this message in error.
> For the full disclaimer please access http://www.salford.gov.uk/e-mail
> Thank you.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> 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
>
>


-- 

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Reply via email to