[Geoserver-users] Bgcolor in getLegendGraphic [Sec=Unclassified]

Eh? Super fast Justin... Thanks very much :slight_smile:

Miles

> -----Original Message-----
> From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
> Well... ask and thou shalt receive!! :). I have implemented
> this feature on 1.5.x and trunk. It was easy due to Saul's
> recent LegendOptions work. So here is the deal:
>
> To specify background color you use the LEGEND_OPTIONS
> parameter like so:
>
> LEGEND_OPTIONS=bgColor:000000
>
> I also added an option to change the label color as well:
>
> LEGEND_OPTIONS=bgColor:000000;fontColor:ffffff
>
> Enjoy. I just generated another nightly build so you can
> grab the latest and try it out.
>
> http://geo.openplans.org/nightly/1.5.x/geoserver-1.5.x-latest-bin.zip
>
> -Justin
>
> Miles Jordan wrote:
> >
> > > -----Original Message-----
> > > From: Justin Deoliveira
> > > Is your intent to have the background of the legend image
> > > itself to be a different color.
> >
> > Yes, that was the functionality I was investigating :slight_smile:
> >
> > > I would have to check the
> > > spec to be sure but I don't think the bgcolor will really
> > > apply to the resulting legend graphic since it is meant to
> > > portray the styles of features in a getMap request and not
> > > the background of the resulting image.
> > >
> > > That being said, I can see how this could be a useful option
> > > to have. Especially if one of the rules of and SLD specifies
> > > a "white" polygon or something. It would be pretty straight
> > > forward to add as an additional parameter to the
> > > GetLegendGraphic operation (something outside the spec but
> > > something that geoserver supports).
> > >
> >
> > Yeah, I had a feeling it would be a pretty simple geoserver-only
> > feature to add in, and I would have had a go myself if it
> weren't for
> > the fact that I couldn't get the source to build last time I
> > downloaded it. It would be handy, though -
> getLegendGraphic is really
> > useful - I use it for more than just showing legends on maps, eg.
> > Showing how an SLD might style something. The reason I
> brought it up
> > was because I was looking at the getLegendGraphic of an
> SLD that had 2
> > styles in it, but I could barely see half of it because it
> was almost
> > white - pretty much the same scenario that you described.
> >
> > Version 1.6 is looking good, btw :slight_smile:
> >
> > Regards,
> >
> > Miles
> >

>
___________________________________________________________________________

    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.antarctica.gov.au/
___________________________________________________________________________