Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
1  
Please check following url docs.geoserver.org/latest/en/user/services/wms/… –  Sunil Apr 12 '13 at 7:57

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.