I want to know if is possible to change spacing of a normal (not raster) legend in Geoserver:
I need to add more space between the squares and the text.
There are dx,dy,mx,my
parameters but they only work for Raster Layers
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI want to know if is possible to change spacing of a normal (not raster) legend in Geoserver:
I need to add more space between the squares and the text.
There are dx,dy,mx,my
parameters but they only work for Raster Layers
Mauro Bartolomeoli is proposing new vendor options to control margin around labels just this week: http://osgeo-org.1560.x6.nabble.com/WMS-GetLegendGraphic-td5293025.html
So, I would expect to find this functionality in a release in the next few months (if I had to guess, maybe 2.9.4 in January 2017, maybe 2.10.1 in December 2016)
The Geoserver manual is a good spot to check out more information.
You could use the GetLegendGraphic to change the normal legend graphics.
The GetLegendGraphic operation itself is optional for an SLD-enabled WMS. It provides a general mechanism for acquiring legend symbols, beyond the LegendURL reference of WMS Capabilities. Servers supporting the GetLegendGraphic call might code LegendURL references as GetLegendGraphic for interface consistency. Vendor-specific parameters may be added to GetLegendGraphic requests and all of the usual OGC-interface options and rules apply. No XML-POST method for GetLegendGraphic is presently defined.
These two parameters can be specified for Vector graphics, as in your case.
WIDTH Optional This gives a hint for the width of the returned graphic in pixels. Vector-graphics can use this value as a hint for the level of detail to include.
HEIGHT Optional This gives a hint for the height of the returned graphic in pixels.
Furthermore,
GeoServer allows finer control over the legend appearance via the vendor parameter LEGEND_OPTIONS. The general format of LEGEND_OPTIONS is the same as FORMAT_OPTIONS,
You could get more details from the Geoserver manual