Ticket #1291 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

getlegendgraphic documentation

Reported by: assefa Owned by: jmckenna@…
Priority: high Milestone:
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc: jmckenna@…

Description

Update the wms doc with the GetLegendGraphic support.

Change History

Changed 8 years ago by dmorissette

  • cc jmckenna@… added
  • summary changed from getlegendgraphic documentation to getlegendgraphic documentation
Assefa, what are the required docs updates?

Changed 8 years ago by refractions

Some doco additions for the WMS howto:

In order for the WMS 1.1.1 GetLegendGraphic request to work you must:
- Have a LEGEND object defined in your map file
- Have a CLASS object for each layer
- Have a NAME in your CLASS object for each layer
- Have the STATUS of each LAYER set to ON

Changed 8 years ago by assefa

looking into this

Changed 8 years ago by assefa

 In general the GetLegendGraphic will draw an icon and a label for all classes 
defined on the layer. The drawing parameters are taken from the Legend object 
(The KEYSIZE element in the legend object will control the size of the icons 
and the Lable oblect will control the way the label appears).
 Please see comment #2 for other manadatory setiings to have this working.
 
Parameters for GetLegendGraphic are :


 - Layer (Mandatory) Name of the wms layer to on which you want to get the 
legend
 - Format (Mandatory) : image format (something like image/png)
 - WIDTH  (Optional) : The width and heigh are only useful when the rule 
parameter is also used in the request. When that is the case, they represent 
the width/height of the icon generated
 - Height (Optional) 
 - SLD : (Optional) : Applies the SLD on the layer and the legend is drawn 
after the SLD is applied (using the classes specfied by the SLD). Note here 
that you need to put a <Name>class1</Name> inside the Rule element so that a 
class name is created from the sld and thus a correct legend.
 - SLD_BODY : Optional
 - Scale : Optional : If scale is specfied only layers that fell info that 
scale will have a legend

 - Rule (Optional) : It repsensts the class name. It is used to generate only 
an icon and a label for one class

 Other notes maybe worth mentionning : all rules that are used to draw the 
legend in cgi mode applies. Maybe a link to that doc is good.

  If I missed something or you need more info let me know

Changed 8 years ago by dmorissette

Should something be said in the docs about the stuff discussed in bug 653? i.e.
the fact that sometimes you get just a legend icon with no label, and sometimes
the legend graphic includes a label. I forget what the exact behavior is, but it
may need to be explained.

Changed 8 years ago by jmckenna@…

  • component changed from WMS Server to MapServer Documentation

Changed 8 years ago by jmckenna@…

  • owner changed from mapserverbugs to jmckenna@…
reassigning

Changed 8 years ago by jmckenna@…

  • status changed from new to closed
  • resolution set to fixed
added getlegendgraphic section to wms-server doc, in CVS.  Also added
undocumented KEYIMAGE parameter to the mapfile-reference doc.
Note: See TracTickets for help on using tickets.