[Chameleon] Legend template using group rather than layer

Daniel Morissette dmorissette at dmsolutions.ca
Thu May 20 10:39:17 EDT 2004


Paul Spencer wrote:
> 
> "HTML block to use for layer group headers if layers should be grouped 
> in the legend. If not set then layers are not grouped in the legend.
> 
> When the [leg_group_html] tag is used, then layers that don't belong to 
> any group (i.e. LAYER GROUP not set in the mapfile) and their classes 
> will not show up at all in the legend. The group list is decided by the 
> order_metadata parameter, which is explained later."
> 
> What I think is most confusing here is that layers that have no group 
> will not show up in the legend if the leg_group_html is used, regardless 
> of whether you use a leg_layer_html or not.
> 

If you think of a grouped legend as a hierarchy of objects then it all 
makes sense:  A grouped legend contains [1..n] groups which contain 
[1..n] layers which in turn contain [1..n] classes.

If you decide that your legend is going to use groups then it is not 
possible to display layers that don't have a group setting because they 
are orphan and are not attached to anything in the hierarchy described 
above.

We could have decided to create a default (null) group I guess... I'm 
not sure why we didn't, but anyway if you are going to use groups in 
your legend then it just makes sense to use them everywhere or not at all.

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



More information about the Chameleon mailing list