-
Notifications
You must be signed in to change notification settings - Fork 1
GSIP 146
Introduce new options (LEGEND_OPTIONS) to allow alternative icons layout in bitmap GetLegendGraphic outputs, such as horizontal layout, multi column and multi row layouts.
Mauro Bartolomeoli
This proposal is for GeoServer 2.10 and later.
- Under Discussion
- In Progress
- Completed
- Rejected
- Deferred
The current standard single column vertical layout of icons can be sub-optimal when you have many rules. In many cases having more than one column allows to get more visible icons in a more compact space. Moreover, depending on the client application preference, often having icons layed out horizontally can be preferrable. With a couple of additional options we could allow for both this kind of layouts.
I would like to add support for some new keys in WMS GetLegendGraphic LEGEND_OPTIONS property:
- layout: with vertical (default) and horizontal as possible values
- columnHeight/rowWidth: to allow multicolumn/row layouts based on a max size (in pixels) for the column / row
- columns/rows: to allow multicolumn/row layouts based on a fixed (max) # of columns / rows
When specifying both columnHeight - columns (or rowWidth - rows) the columns / rows will be filled with icons up to the column (row) max size, but no more than the specified # of columns (rows) will be rendered (this could lead to some missing icons in the rendering).
Here are some samples:
Horizontal layout:
Horizontal layout with rows:
Horizontal layout with rowwidth:
Vertical layout with columns:
Vertical layout with columnheight:
Raster ramp style with horizontal layout:
Raster intervals style with horizontal layout:
Raster intervals style with vertical layout and columnheight:
No backwards compatibility issue should arise, since when the new parameters are not specified the old standard layout will apply.
Project Steering Committee:
- Alessio Fabiani: +1
- Andrea Aime: +1
- Ben Caradoc-Davies: +1
- Brad Hards: +1
- Christian Mueller: +1
- Ian Turton: +1
- Jody Garnett: +1
- Jukka Rahkonen: +1
- Kevin Smith:
- Simone Giannecchini: +1
©2020 Open Source Geospatial Foundation