MapTools.org

[Chameleon] Legend template help

Darren.Cope@statcan.ca Darren.Cope@statcan.ca
Mon, 5 Apr 2004 07:24:52 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C41B00.9D3D9D50
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,

I am having some issues with my legend.  I am using the Chameleon 1.0 =
(CWC2)
application.  I have created an html legend (see below) which displays
non-WMS layers as I would like (with their correct legend icons).
Unfortunately, the "Query" widget does not query non-WMS layers, so I =
would
like to use only WMS layers in my application, and would like to =
duplicate
my current legend with WMS layers only, and then remove all of the =
layers in
my template map file (at this point, I am displaying all layers from =
both a
WMS and from my map template file.  This, obviously, is not a good =
solution
to the problem, and causes layers to show up twice in the legend.)  I =
think
the main problem is that I cannot display the legend icons for WMS
layers--does anyone know how to do this properly?  If I could display =
legend
icons for WMS layers, I would be able to use only layers from my WMS =
server,
and this would fix all of my problems.

Any advice is much appreciated!  Here is my html legend template:




[leg_layer_html opt_flag=3D15]

  <tr bgcolor=3D"#FFFFFF" width=3D100%">
    <td align=3D"center"><input type=3D"checkbox" =
name=3D"legendlayername[]"=20
value=3D"[leg_layer_name]"
    [if name=3Dlayer_status oper=3Deq  value=3D1]CHECKED[/if]
    [if name=3Dlayer_status oper=3Deq value=3D2]CHECKED[/if]></td>
    [if name=3Dwms_name oper=3Disnull]
   <td>
<a href=3D"#"
onclick=3D"javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><fon=
t
face=3D"Arial, Helvetica, sans-serif"
size=3D"3">[leg_layer_name]</font></a></td>
  </tr>
    [/if]
    [if name=3Dwms_name oper=3Disset]
    <td><img src=3D"[leg_icon]"><a href=3D"#"
onclick=3D"javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><fon=
t
face=3D"Arial, Helvetica, sans-serif" size=3D"2">[metadata
name=3DWMS_TITLE]</font></a></td>
  </tr>
    [/if]

[/leg_layer_html]

[leg_class_html opt_flag=3D15]
<tr><td colspan=3D"2" align=3D"right">
<font face=3D"Arial, Helvetica, sans-serif" size=3D"1">
[leg_class_name]
</font>
<IMG SRC=3D"[leg_icon]">
</td></tr>
[/leg_class_html]


Thanks in advance for any suggestions!

Darren Cope
Statistics Canada/Statistique Canada
Geography Division/Division de la g=E9ographie
Jean Talon 3D5
Ottawa, Canada
(613) 951-6461


------_=_NextPart_001_01C41B00.9D3D9D50
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.19">
<TITLE>Legend template help</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi all,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I am having some issues with my =
legend.&nbsp; I am using the Chameleon 1.0 (CWC2) application.&nbsp; I =
have created an html legend (see below) which displays non-WMS layers =
as I would like (with their correct legend icons).&nbsp;&nbsp; =
Unfortunately, the &quot;Query&quot; widget does not query non-WMS =
layers, so I would like to use only WMS layers in my application, and =
would like to duplicate my current legend with WMS layers only, and =
then remove all of the layers in my template map file (at this point, I =
am displaying all layers from both a WMS and from my map template =
file.&nbsp; This, obviously, is not a good solution to the problem, and =
causes layers to show up twice in the legend.)&nbsp; I think the main =
problem is that I cannot display the legend icons for WMS layers--does =
anyone know how to do this properly?&nbsp; If I could display legend =
icons for WMS layers, I would be able to use only layers from my WMS =
server, and this would fix all of my problems.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any advice is much appreciated!&nbsp; =
Here is my html legend template:</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">[leg_layer_html opt_flag=3D15]</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;tr =
bgcolor=3D&quot;#FFFFFF&quot; width=3D100%&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;td =
align=3D&quot;center&quot;&gt;&lt;input type=3D&quot;checkbox&quot; =
name=3D&quot;legendlayername[]&quot; </FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">value=3D&quot;[leg_layer_name]&quot;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [if =
name=3Dlayer_status oper=3Deq&nbsp; value=3D1]CHECKED[/if]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [if =
name=3Dlayer_status oper=3Deq =
value=3D2]CHECKED[/if]&gt;&lt;/td&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [if =
name=3Dwms_name oper=3Disnull]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp; &lt;td&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;a href=3D&quot;#&quot; =
onclick=3D&quot;javascript:LegendTemplateLayerInfo('[leg_layer_name]');&=
quot;&gt;&lt;font face=3D&quot;Arial, Helvetica, sans-serif&quot; =
size=3D&quot;3&quot;&gt;[leg_layer_name]&lt;/font&gt;&lt;/a&gt;&lt;/td&g=
t;</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;/tr&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [/if]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [if =
name=3Dwms_name oper=3Disset]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; &lt;td&gt;&lt;img =
src=3D&quot;[leg_icon]&quot;&gt;&lt;a href=3D&quot;#&quot; =
onclick=3D&quot;javascript:LegendTemplateLayerInfo('[leg_layer_name]');&=
quot;&gt;&lt;font face=3D&quot;Arial, Helvetica, sans-serif&quot; =
size=3D&quot;2&quot;&gt;[metadata =
name=3DWMS_TITLE]&lt;/font&gt;&lt;/a&gt;&lt;/td&gt;</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&nbsp; &lt;/tr&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&nbsp;&nbsp;&nbsp; [/if]</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">[/leg_layer_html]</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">[leg_class_html opt_flag=3D15]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;tr&gt;&lt;td =
colspan=3D&quot;2&quot; align=3D&quot;right&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;font face=3D&quot;Arial, =
Helvetica, sans-serif&quot; size=3D&quot;1&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[leg_class_name]</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/font&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;IMG =
SRC=3D&quot;[leg_icon]&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/td&gt;&lt;/tr&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">[/leg_class_html]</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks in advance for any =
suggestions!</FONT>
</P>

<P><B><FONT SIZE=3D1 FACE=3D"Arial Narrow">Darren Cope</FONT></B>
<BR><FONT SIZE=3D1 FACE=3D"Arial Narrow">Statistics Canada/Statistique =
Canada</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial Narrow">Geography Division/Division de =
la g=E9ographie</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial Narrow">Jean Talon 3D5</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial Narrow">Ottawa, Canada</FONT>
<BR><FONT SIZE=3D1 FACE=3D"Arial Narrow">(613) 951-6461</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C41B00.9D3D9D50--


This archive was generated by Pipermail.