Hey,
I think theres a bug in getLegendGraphic - the image comes out padded
with whitespace.
If I request a LegendGraphic that's 150 pixels wide, I only get 100
pixels of image, padded by 25 pixels of whitespace either side of the
image. The same goes for the height - only about 2/3 of the image is
used. The problem escalates the larger the image is.
This poses a problem at least for me because when displaying
LegendGraphics on a screen I want to be able to control how much
whitespace is around the image, using html or css attributes on, say, a
table. Right now its taking up 50 valuable pixels of my display 
Could one of you please let me know if I should file this as a bug, or
is it supposed to be like that?
Thanks,
Miles
Miles Jordan
Applications Developer
The Australian Antarctic Data Centre
[p] +61 3 6232 3486
[f] +61 3 6232 3359
[e] miles.jordan@anonymised.com
[w] http://www.aad.gov.au/
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________
Gabriel wrote that code, perhaps he has some insight in to it.
Gabriel? Any thoughts?
Miles Jordan wrote:
Hey,
I think theres a bug in getLegendGraphic - the image comes out padded
with whitespace.
If I request a LegendGraphic that's 150 pixels wide, I only get 100
pixels of image, padded by 25 pixels of whitespace either side of the
image. The same goes for the height - only about 2/3 of the image is
used. The problem escalates the larger the image is.
This poses a problem at least for me because when displaying
LegendGraphics on a screen I want to be able to control how much
whitespace is around the image, using html or css attributes on, say, a
table. Right now its taking up 50 valuable pixels of my display 
Could one of you please let me know if I should file this as a bug, or
is it supposed to be like that?
Thanks,
Miles
Miles Jordan
Applications Developer
The Australian Antarctic Data Centre
[p] +61 3 6232 3486
[f] +61 3 6232 3359
[e] miles.jordan@anonymised.com
[w] http://www.aad.gov.au/
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
Visit our web site at http://www.aad.gov.au/
___________________________________________________________________________
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com
hhmmm.. yeah, though I don't have the code at hand, I'm pretty sure we're
padding by a percentage of the image dimensions.
The spec says nothing about if thats a correct behavior, its completely up to
implementors. You'll find a similar issue if you expect the returned image
being exactly of the size specified by the width and height parameters: if
your sld has more than one rule, the returned image will be scaled up on the
Y axis to return a stack of representative graphics, one for each rule.
Back to the padding issue, I'm quite realizing that what we're currently doing
is wrong. It makes more sense to let the graphic fill the whole image and let
the client take care of layout, so yeah, please add it as a jira task, so it
gets not lost in the archives. I hope to have a run over a bunch of my
pending tasks starting next week.
Gabriel.
On Tuesday 21 March 2006 16:00, Chris Holmes wrote:
Gabriel wrote that code, perhaps he has some insight in to it.
Gabriel? Any thoughts?
Miles Jordan wrote:
> Hey,
>
> I think theres a bug in getLegendGraphic - the image comes out padded
> with whitespace.
>
> If I request a LegendGraphic that's 150 pixels wide, I only get 100
> pixels of image, padded by 25 pixels of whitespace either side of the
> image. The same goes for the height - only about 2/3 of the image is
> used. The problem escalates the larger the image is.
>
> This poses a problem at least for me because when displaying
> LegendGraphics on a screen I want to be able to control how much
> whitespace is around the image, using html or css attributes on, say, a
> table. Right now its taking up 50 valuable pixels of my display 
>
> Could one of you please let me know if I should file this as a bug, or
> is it supposed to be like that?
>
> Thanks,
>
> Miles
>
>
>
> Miles Jordan
> Applications Developer
> The Australian Antarctic Data Centre
>
> [p] +61 3 6232 3486
> [f] +61 3 6232 3359
> [e] miles.jordan@anonymised.com
> [w] http://www.aad.gov.au/
> _________________________________________________________________________
>__
>
> Australian Antarctic Division - Commonwealth of Australia
> IMPORTANT: This transmission is intended for the addressee only. If you
> are not the intended recipient, you are notified that use or
> dissemination of this communication is strictly prohibited by
> Commonwealth law. If you have received this transmission in error, please
> notify the sender immediately by e-mail or by telephoning +61 3 6232 3209
> and DELETE the message.
> Visit our web site at http://www.aad.gov.au/
> _________________________________________________________________________
>__
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language that extends applications into web and mobile media. Attend the
> live webcast and join the prime developer group breaking into this new
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Gabriel Roldán (groldan@anonymised.com)
Axios Engineering (http://www.axios.es)
Tel. +34 944 41 63 84
Fax. +34 944 41 64 90