Opened 20 years ago

Last modified 20 years ago

#732 new defect

Need a way to control layer legend labels via WMS

Reported by: dmorissette Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.3
Severity: normal Keywords:
Cc: bartvde@…, valik.solorzano.barboza@…, pagurekd@…

Description

In bug 653, we need a way to use the "WMS_TITLE" metadata as the legend label
for a graphic legend image produced by GetLegendGraphic.

Normally, it's the NAME of the layer that is used as the label in a graphic
legend, but in the case of WMS layers, the name is usually a shorter unique
string, and the WMS_TITLE is the human-readable version.

I'd hate to have to hack something in the graphical legend code to support
reading label values from metadata... but is there any other options?

Any thoughts? Suggestions?

Change History (4)

comment:1 by dmorissette, 20 years ago

blocked: 653

comment:2 by dmorissette, 20 years ago

Cc: mapserver-bugs@… added

comment:3 by pagurekd@…, 20 years ago

Cc: pagurekd@… added

comment:4 by sdlime, 20 years ago

There is an attribute in classObj called "title" that was intended for legend 
labels, with "name"'s becoming truly unique. I wanted a way to control class 
parameters via a URL and names, unless short and unique, are bad for that. The 
class title is already supported in the mapfile reader so you could leverage 
that. What about a function like msGetLegendLabel that would get the label 
with this priority:

 - class title
 - OWS/WMS_TITLE
 - class name

Steve
Note: See TracTickets for help on using tickets.