[Fwd: Re: [UMN_MAPSERVER-DEV] single classed layers and GetLegendGraphic]

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Tue Nov 9 11:33:11 EST 2004


> -----Original Message-----
> From: Daniel Morissette [mailto:dmorissette at dmsolutions.ca] 
> Sent: Tuesday, 09 November, 2004 11:06
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-DEV at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-DEV] [Fwd: Re: 
> [UMN_MAPSERVER-DEV] single classed layers and GetLegendGraphic]
> 
> 
> Kralidis,Tom [Burlington] wrote:
> > RULE makes me nervous because it's a MapServer specific which a WMS 
> > client doesn't necessarily know at runtime.
> > 
> 
> What do you mean by MapServer specific? RULE is part of the SLD spec 
> AFAIK, and the current behavior was derived from cubeserv 
> examples (see 
> bug 653).
> 

Sorry, I meant specific in the sense that one would have to do a
GetStyles to get rule names, figure out which one they want, then
generate GetLegendGraphic with the RULE parameter.  Eeesh.

Bottom line is that, unless a layer has a classification associated with
it, I don't think (at least from what I've seen in implementations) that
text is needed, as this (usually) is taken on by a client who would
(presumably and commonly seen in implementations) print out
<Layer><Title> information along side the legend icon, as part of, say,
an HTML TABLE construct.

> 
> > 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
> 
> This would still result in an unpredictable behavior for clients: it 
> would be impossible for a client to know whether they should expect a 
> single icon or a legend with text labels unless they go back to the 
> server and find out if there are multiple rules (classes) or not.
> 

Hence the "GetLegend" request, in which a client can be guaranteed to
get at least the layer title text if the layer is not classified.
GetLegendGraphic will (should?) only return text if the layer is
classified.

> I think we need to be consistent: either always produce a 
> label when no 
> rule is specified (the current behavior), or never produce a 
> label (that 
> was our first interpretation but we had requests to align our 
> behavior 
> with other servers in bug 653).
> 
> 
> >  - 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
> > 
> 
> That might be nice for clients that know they're dealing with 
> MapServer, 
> but won't help for "real" interoperability until this request 
> is added 
> to the spec.
> 

Right.  I think this is a neat alternative (and vendor specific) for
those who want text as part of the graphic.

In terms of rolling this into spec, don't hold your breath.  IMHO, this
would be best addressed in some sort of "Viewer Client" specification,
which could generate aggregated legend graphics, given layers/servers,
or a WMC.

..Tom


> Daniel
> -- 
> ------------------------------------------------------------
>   Daniel Morissette               dmorissette at dmsolutions.ca
>   DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------
> 



More information about the mapserver-dev mailing list