[Mapserver-users] Metadata access via templates
Lowther, David W
dlowther@ou.edu
Thu, 30 Jan 2003 08:33:46 -0600
Michael,
I don't know the answer to your question, but I am doing something similar
in a different way. I am using the HTML legend and in that template file the
metadata items are available for everything in the legend. You can have your
legend show all layers all the time. If I remember right that is what
opt_flag=15 means. The HTML Legend docs are great or I'll be glad to help
you out if you decide to go this route . Here's an example:
[leg_layer_html opt_flag=15 order_metadata=legend_order]
<tr>
<td valign=top align=center>
<input type=checkbox name=layer
value=[leg_layer_name] [if name=layer_status value=1]CHECKED[/if]>
</td>
<td colspan=2 nowrap><img src=images/spacer.gif width=82
height=1><span class=legendtext>[metadata name=wms_title]</span></td>
[/leg_layer_html]
Dave
-----Original Message-----
From: Michael Schulz [mailto:mschulz@webgis.de]
Sent: Thursday, January 30, 2003 4:23 AM
To: MapServer Userlist
Subject: [Mapserver-users] Metadata access via templates
Hi,
is it correct, that metadatakey substitution( [layername_metadatakey]) in
templates is only happening when that specific layer is drawn? Otherwise the
substituion is empty?!
mapfile snip:
LAYER
NAME "ffh"
METADATA
"l_name" " "
"infofile" "ffh.html"
END
template snip:
<td class="cmd"><a href="./[ffh_infofile]" target="_new">FFH</a></td>
processed html when layer drawn:
<td class="cmd"><a href="./ffh.html" target="_new">FFH</a></td>
processed html when layer not drawn:
<td class="cmd"><a href="./" target="_new">FFH</a></td>
I am using this in the layer selection part, where the layers appear even if
they are not drawn on the map, is there a way that the substitution will
happen in every case? Thanks,
Michael
--
-----------------------------------------------------------
Michael Schulz in medias res
Dipl.-Geologe Gesellschaft für
Informationstechnologie mbH
Sautierstr. 38, 79104 Freiburg
0761 55695-95 (Fax 96)
mschulz@webgis.de www.webgis.de
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users