[Fwd: Re: [UMN_MAPSERVER-DEV] single classed layers and
GetLegendGraphic]
Kralidis,Tom [Burlington]
Tom.Kralidis at EC.GC.CA
Tue Nov 9 10:52:01 EST 2004
RULE makes me nervous because it's a MapServer specific which a WMS
client doesn't necessarily know at runtime.
This is what I propose:
- update GetLegendGraphic to:
- print out legend icons of one layer as *just* an icon if there's only
one CLASS object
- code change needed to handle this
- print out legend icons of one layer with text of rule names if
there's more than one CLASS object
- this is present behaviour -- no code change required
- implement a VendorSpecific Capability called "GetLegend" which acts
like mode=legend, and prints out 'full' legends of multiple layers,
which includes titles for layers with icons
VERSION=1.1.1
SERVICE=WMS
REQUEST=GetLegend
FORMAT=<supported_image_format>
LAYERS=<layer_list>
STYLES=<style_list>
This way, one has the choice for both. This eliminates the RULE
scenario from GetLegendGraphic.
Comments?
..Tom
> -----Original Message-----
> From: UMN MapServer Developers List
> [mailto:MAPSERVER-DEV at LISTS.UMN.EDU] On Behalf Of Bart van den Eijnden
> Sent: Tuesday, 09 November, 2004 10:27
> To: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-DEV] [Fwd: Re: [UMN_MAPSERVER-DEV]
> single classed layers and GetLegendGraphic]
>
>
> Hi,
>
> If I understand correctly, the problem is that
> GetLegendGraphic for single class layers returns the text
> next to the image if the Rule is not specified?
>
> Maybe I am missing some part here in the discussion, but is a
> GetStyles request not intended for getting the rule names?
>
> >> We can use RULE=, however how would a WMS client know what the
> >> rule/class names are?
>
> BTW, I had not re-subsribed to the mapserver-dev list, I had
> not realized it was also moved to the new listserv ...
>
> Best regards,
> Bart
>
> > Kralidis,Tom [Burlington] wrote:
> >
> >>>-----Original Message-----
> >>>From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca]
> >>>Sent: Monday, 08 November, 2004 10:30
> >>>To: Kralidis,Tom [Burlington]
> >>>Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> >>>Subject: Re: [UMN_MAPSERVER-DEV] single classed layers and
> >>>GetLegendGraphic
> >>>
> >>>
> >>>Is it possible for you to use the RULE parameter (set to the class
> >>>name
> >>>) ? That should retun only the icon for the class.
> >>>If not, I am not sure what the best solution is. Maybe add
> a support
> >>>to a vendor specific request parameter that alaways return an
> >>>icon for the
> >>>first class. I personnaly prefer this way rather than having
> >>>a diffrent
> >>>behaviour when there is one or more than one classes. Comments ?
> >>>
> >>
> >>
> >> We can use RULE=, however how would a WMS client know what the
> >> rule/class names are?
> >>
> >> I have received some other responses which favour this approach
> >> because
> one can get a 'full' legend without the need to print out
> text, as it's handled in the output graphic. This makes
> sense in this context.
> >>
> >> As a result, what do people think about:
> >>
> >> - making GetLegendGraphic always return icon ONLY for single-class
> layers, full for multiple classes (as per now)
> >> - adding in VendorSpecificCapabilities called "GetLegend"
> which would
> return a 'full' legend, titles and all for multiple layers,
> so someone can get a single legend icon for multiple WMS
> layers from the same WMS? We could also extend so that such a
> request can also ingest a Web Map Context Document and output
> a single legend graphic.
> >>
> >> Comments?
> >>
> >
> > I waited a bit for others to respond.
> >
> > I personally like the idea of giving the control to the
> user to output
> full legend or icons based on a specific VendorSpecificCapabilities.
> > %2
>
More information about the mapserver-dev
mailing list