Thanks, Jody. Good to know that it's a relatively simple extension. Not sure if/when we'll have time to do development on this thiough.
And the idea of a map/scale-aware GetLegendGraphic is a good one. Legends for our maps can get very long, so any way of cutting them down to size is useful. On Sun, Sep 27, 2015 at 2:17 PM, Jody Garnett <jody.garn...@gmail.com> wrote: > Hey Martin: > > I am sure we could do that, we already have a bunch of options to try and > pass in current scale/dpi to try and get a visual that matches what is on > the screen. > > The code is here: > > > https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/GetLegendGraphicRequest.java > > The important part is: > > * <tr><td>LAYER </td><td>Required </td><td>Layer for which to produce > legend graphic. A layergroup can be specified, too. In this case, STYLE and > RULE parameters can have multiple values (separated by commas), one for > each of the group layers.</td></tr> > > So if style and rule are already setup it should be fairly easy to allow > layer to have multiple values separated by commas. > > Indeed internally the code already has: > > /** The featuretype(s) of the requested LAYER(s) */ > private List<FeatureType> layers=new ArrayList<FeatureType>(); > > So no change to the data structure and logic should be required, just > parser and test case. > > Aside: As long as we are dreaming here I would love to have one that > operates like GetFeatureInfo - and includes a reference GetMap complete > with BBox (and thus could only show the layers / rules that end up having > something on the screen. > > -- > Jody Garnett > > On 25 September 2015 at 09:48, Martin Davis <mtncl...@gmail.com> wrote: > >> It looks like GetLegendGraphic only supports requesting a legend for a >> single layer. Could this be generalized to allow multiple layers being >> requested? >> >> The use case is that in some simple clients it's difficult to display an >> arbitrary-length list of images (e.g. Jasper Reports). >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Geoserver-users mailing list >> Geoserver-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> >> >
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users