[Mapserver-users] Q: Dynamic Legends

Van Ulden, Joost jvanulde at nrcan.gc.ca
Thu Jan 29 15:50:52 EST 2004


The dynamic HTML legend will allow you to hide the classnames but still show
the layer title for inactive layers.  Not sure if this is exactly what you
need but it may be a start.  Here is a sample:

[leg_layer_html order_metadata=WMS_ORDER visibility_flag=15 opt_flag=15]
<TR> 
<TD>[if name=layer_status oper=neq value=2]<INPUT type=checkbox name="layer"
value="[leg_layer_name]"
onClick="mapForm.INPUT_COORD.value='';mapForm.zoomdir.value='0';mapForm.mode
.value='browse';mapForm.target='_self';mapForm.submit()" [if
name=layer_status oper=eq value=1]CHECKED[/if]>[/if][metadata
name=WMS_TITLE] 
</TD>
</TR>
[/leg_layer_html]
[leg_class_html visibility_flag=15]
[/leg_class_html]

Hope this helps!

============================================
Joost van Ulden
Programmer/Analyst
Natural Resources Canada / Ressources naturelles Canada
Geological Survey of Canada / Commission geologique du Canada
101 - 605 Robson Street / 101 - 605 rue Robson
Vancouver, B.C. / Vancouver (C.-B.)
V6B 5J3
Office/Bureau:  604.666.7525
fax/telecopieur: 604.666.1124
jvanulde at nrcan.gc.ca
============================================


> -----Original Message-----
> From: Jean-Henry Berevoescu [mailto:bjh at globexplorer.com] 
> Sent: Thursday, January 29, 2004 11:16 AM
> To: mdoggett at coas.oregonstate.edu
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] Q: Dynamic Legends
> 
> 
> 
> I tried that one and all the possible combinations (and their 
> sum). Nothing works.
> 
> Thanks,
> Jean
> 
> 
> Matt Doggett wrote:
> 
> >I believe HTML legends will do the trick. In the 
> legend_template.html 
> >file you could specify [leg_class_html opt_flag=12] for example. see 
> >the HTML legend How-To for more details about the opt_flag bit mask.
> >
> >http://mapserver.gis.umn.edu/doc40/html-legend-howto.html
> >
> >MD
> >
> >  
> >
> >>-----Original Message-----
> >>From: mapserver-users-admin at lists.gis.umn.edu 
[mailto:mapserver-users- 
>>admin at lists.gis.umn.edu] On Behalf Of Jean-Henry Berevoescu
>>Sent: Wednesday, January 28, 2004 8:12 PM
>>To: mapserver-users at lists.gis.umn.edu
>>Subject: [Mapserver-users] Q: Dynamic Legends
>>
>>
>>Hi,
>>Is there a way to have the legend dynamically show only the classes of
>>    
>>
>a
>  
>
>>layer actually
>>shown in a map (not the whole defined set in the mapfile)?
>>
>>Jean
>>
>>_______________________________________________
>>Mapserver-users mailing list Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>    
>>
>
>
>  
>

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list