[Chameleon] Selectively displaying layers in a legend

Godwin, Elizabeth Godwinl at AGR.GC.CA
Fri Oct 22 10:09:51 EDT 2004


This is extracted from the HTML Legend help file on the Mapserver Web
page.  
http://mapserver.gis.umn.edu/doc42/html-legend-howto.html

I found it works well.
When you start a layer block, add the order_metadata option:

[leg_layer_html order_metadata=legend_order opt_flag=5]

where "legend_order" is a metadata tag.  Setting the value to "-1" for a
layer results in it not showing in the legend.  Layers without the tag
(I'm pretty sure this is ok), or with equal values > 0 order themselves
according to their normal order.  

If you have a fairly simple mapfile, this is the cleanest approach,
IMHO.

Liz

> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org 
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Jennifer Zeisloft
> Sent: October 21, 2004 9:10 PM
> To: Chameleon at lists.maptools.org
> Subject: [Chameleon] Selectively displaying layers in a legend
> 
> 
> Hello All...
> 
> I am extremely new to MapServer, Chameleon, etc. (and web 
> technology, for that matter), and I am wondering how I might 
> show certain layers and not others in a legend.  I am working 
> off of the sample_enhanced files in the Chameleon sample 
> applications.  This uses the legend template widget, but if 
> something else would work better for selectively showing 
> layers, I'd be more than willing to attempt using another widget.
> 
> I am not all that familiar with the various code languages 
> and I haven't a clue which file would be the best to alter.  
> Any help would be VERY much appreciated!  Thanks in advance.
> 
> Jennifer Zeisloft
> (UW-Madison, Sea Grant) 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list