MAPSERVER-USERS Digest - 24 Oct 2004 to 25 Oct 2004 (#2004-93)

Robin Robin querada499 at HOTMAIL.COM
Tue Oct 26 08:26:59 EDT 2004


Not sure how you want them to work but mine turn layers on and off.  here is
a section of my legend template:

[leg_layer_html order=ascending opt_flag=15]
<div>
<input type="checkbox" name="legendlayername[]" value="[leg_layer_name]" [if
name=layer_status oper=eq value=1]CHECKED[/if][if name=layer_status oper=eq
value=2]CHECKED[/if]>
<img src="[leg_icon width=20 height=18]" width="20" height="20">
<a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');">[leg_layer_name]</a>
</div>
[/leg_layer_html]

The if block checks on a refresh if a layer is on or not and puts a check in
the box accordingly.  To turn layers on and off you check the boxes you want
then refresh the map.

Hope that helps.

Robin


>Date:    Mon, 25 Oct 2004 08:49:43 -0500
>From:    Blammo <bob.basques at CI.STPAUL.MN.US>
>Subject: Re: legends
>
>I've got the legend displaying for the most part correctly, but Danged
>if I can get the checkboxes to work the way I expect them to.
>
>bobb
>
>Robin Robin wrote:
>
> > Hi, don't know if you got an answer yet on your legend question.
> >
> > here are some examples:
> > http://www.maptools.org/twiki/bin/view/Oldwikitmp/HTMLLegendExample
> > http://mapserver.gis.umn.edu/doc40/html-legend-howto.html
> >
> > The main thing to get layer names is to have the [leg_layer_html]
> > [/leg_layer_html] tags.
> >
> > Hope that helps!
> >
> > -robin
> >

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/



More information about the mapserver-users mailing list