Help! html legend problems

joanne cook j.cook at OXFORDARCH.CO.UK
Mon Dec 12 01:37:39 PST 2005


Hi Everyone,
 
I have got myself into a terrible mess with html legends and would appreciate some assistance, as nothing I do seems to work. I am trying to implement a legend with check boxes for layer control, that only displays layers that are in scale on the map. So far so good. My legend template is shown below: 
 
[leg_layer_html Opt_Flag=14]
<html>
<head>
<title></title>
</head>
<body>
<tr bgcolor="#FFFFFF">
  <td align="center">
    <input type="checkbox" name="layer_status" value="[leg_layer_name]" [if name=layer_status oper=neq value=0]CHECKED[/if]>
  </td>
  <td><img src="[leg_icon height=15 width=15]" height=15 width=15></td>
  <td><font face="Arial, Helvetica, sans-serif" size="2">[if name=layer_name oper=neq value=][leg_layer_name][/if][if name=layer_name value=]* Name Not Set*[/if]</font></td>
</tr>
</body>
</html>
[/leg_layer_html]
 
My first problem was that when I zoomed in on the map to a scale at which new layers became visible, they appeared switched off in the legend. All the layers in my map file have status ON. I resolved that, or so I thought, but now when I try and switch layers off in the legend, and refresh my map (with a form submit button) they just stay switched on. Also, I don't really understand the relationship between having layers declared as cgi variables in my web page and the behaviour of the legend.
 
I have searched the documentation on this, and I'm sure it must be something very simple that I am missing, so I would really appreciate it if someone could help me out.
 
Many thanks
 
Jo
 
-------------------------------------------
Joanne Cook BSc MLitt AIFA
Information Systems Coordinator
Oxford Archaeology North
-------------------------------------------


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com



More information about the MapServer-users mailing list