legends.

Blammo bob.basques at CI.STPAUL.MN.US
Sat Oct 23 22:01:39 EDT 2004


All,

My partner in crime made some progress with the legend display.

This at least seems to display things correctly.

[leg_layer_html]
        <input type=checkbox name=layer value=[leg_layer_name]
        [if name=layer_status value=1]CHECKED[/if] />
[/leg_layer_html]
[leg_class_html visibility_flag=15]
        <img src=[leg_icon] /> [leg_class_name]<br />
[/leg_class_html]

Now, how to make the checkboxes work . . . .   It's a never ending cycle, I swear. . . .  :c)

bobb



Blammo wrote:

>This is a multi-part message in MIME format.
>--------------030901030101000705020301
>Content-Type: text/plain; charset=us-ascii; format=flowed
>Content-Transfer-Encoding: 7bit
>
>I'm trying to get a legend template working.
>
>I have the CLASS names displaying, but how do I get the LAYER names to
>return?
>
>In the Map File :
>
>LAYER
>    NAME 'tgr2k_mnplacepoly_alb'
>    DATA '/var/www/lehdmap_data/tgr2k_mnplacepoly_alb'
>    TYPE POLYGON
>    STATUS OFF
>    CLASS
>      *NAME 'Cities & Towns'*
>      ##COLOR 0 0 255
>      OUTLINECOLOR 0 0 255
>    END
>    MAXSCALE 2000000
>  END
>
>and in the legend template:
>
>
>   [leg_class_html]
>      <input type=checkbox name="map_[leg_class_name]_status"
>            value=1 [if name=layer_status oper=eq value=2]CHECKED[/if]
> ><img src=[leg_icon]> [leg_class_name]<br>
>   [/leg_class_html]
>
>This displays the "*NAME 'Cities & Towns'" above just fine, but how do I
>get at the LAYER-NAME above, *NAME 'tgr2k_mnplacepoly_alb', I need to
>have them both output, can this be done in the template?
>
>Thanks
>
>
>
>bobb
>
>
>--------------030901030101000705020301
>Content-Type: text/html; charset=us-ascii
>Content-Transfer-Encoding: 7bit
>
><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
><html>
><head>
>  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
>  <title></title>
></head>
><body>
>I'm trying to get a legend template working.<br>
><br>
>I have the CLASS names displaying, but how do I get the LAYER names to
>return?<br>
><br>
>In the Map File :<br>
><br>
>LAYER<br>
>&nbsp;&nbsp;&nbsp; NAME 'tgr2k_mnplacepoly_alb'<br>
>&nbsp;&nbsp;&nbsp; DATA '/var/www/lehdmap_data/tgr2k_mnplacepoly_alb'<br>
>&nbsp;&nbsp;&nbsp; TYPE POLYGON<br>
>&nbsp;&nbsp;&nbsp; STATUS OFF<br>
>&nbsp;&nbsp;&nbsp; CLASS<br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>NAME 'Cities &amp; Towns'</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##COLOR 0 0 255<br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0 255<br>
>&nbsp;&nbsp;&nbsp; END<br>
>&nbsp;&nbsp;&nbsp; MAXSCALE 2000000<br>
>&nbsp; END<br>
><br>
>and in the legend template:<br>
><br>
><br>
>&nbsp;&nbsp; [leg_class_html]<br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=checkbox name="map_[leg_class_name]_status"<br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value=1 [if name=layer_status oper=eq value=2]CHECKED[/if]
>&gt;&lt;img src=[leg_icon]&gt; [leg_class_name]&lt;br&gt;<br>
>&nbsp;&nbsp; [/leg_class_html]<br>
><br>
>This displays the "<b>NAME 'Cities &amp; Towns'" above just fine, but
>how do I get at the LAYER-NAME above, </b>NAME
>'tgr2k_mnplacepoly_alb', I need to have them both output, can this be
>done in the template?<br>
><br>
>Thanks<br>
><br>
><br>
><br>
>bobb<br>
><br>
></body>
></html>
>
>--------------030901030101000705020301--
>
>
>
>



More information about the mapserver-users mailing list