3

Given a wms-service, the GetCapabilities request returns a legendurl like the following:

<LegendURL width="186" height="22">

If I specify a width (like below) when using GetLegendGraphic, it is ignored, and the width in LegendUrl is used.

http://myserver/wms/?LAYER=mylayer&SERVICE=WMS&VERSION=1.1.1&REQUEST=getlegendgraphic&FORMAT=image/png&WIDTH=300

Where can I change the LegendUrl width? or alternately, how do I use the width setting?

Bildsoe
  • 155
  • 8
  • 2
    Please check following url http://docs.geoserver.org/latest/en/user/services/wms/get_legend_graphic/legendgraphic.html – Sunil Apr 12 '13 at 07:57

1 Answers1

3

You can set of GetLegendGraphic parameters in the url

For example

http://machine_name:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=topp:states&legend_options=fontName:Times%20New%20Roman;fontAntiAliasing:true;fontColor:0x000033;fontSize:14;bgColor:0xFFFFEE;dpi:180

For additional details please click here

Sunil
  • 4,763
  • 7
  • 43
  • 87