[mapserver-users] HTM Legend: How to force "click thru" to new page?

Thomas P. Colson tpcolson at nexussoft.com
Fri Nov 15 07:52:58 PST 2002


And to answer my own question...

[leg_layer_html order_metadata=WMS_ORDER opt_flag=15]
      <tr>
           <td><input type=checkbox name=layer value=[leg_layer_name]
             [if name=layer_status value=1]CHECKED[/if]>
              [if name=layer_type value=4]
                  <img src=[leg_icon width=22 height=18]>
              [/if]
              [if name=layer_type oper=neq value=4]<img src=[leg_icon]>[/if]
           </td>
           <td>
              <a href="[leg_layer_name]" target="_blank">[metadata name=description]</a>
           </td>
      </tr>
[/leg_layer_html]

-----Original Message-----
From: Thomas P. Colson 
Sent: Friday, November 15, 2002 10:27 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] HTM Legend: How to force "click thru" to new
page?


I've implemented a nifty HTML legend IAW http://mapserver.gis.umn.edu/doc36/html-legend-howto.html
And it works GREAT!. Thing is, I'm trying to make it so when the legend url is clicked, it opens up a new browser page as opposed to reloading the mapserver page with the url that is in the legend. Any ideas? 


Here's my Legend.html

[leg_layer_html order_metadata=WMS_ORDER opt_flag=15]
      <tr>
           <td><input type=checkbox name=layer value=[leg_layer_name]
             [if name=layer_status value=1]CHECKED[/if]>
              [if name=layer_type value=4]
                  <img src=[leg_icon width=22 height=18]>
              [/if]
              [if name=layer_type oper=neq value=4]<img src=[leg_icon]>[/if]
           </td>
           <td>
              <a href="[leg_layer_name]">[metadata name=description]</a>
           </td>
      </tr>
[/leg_layer_html]


and in my .map file...



  LEGEND
    STATUS ON
    OUTLINECOLOR 195 195 195
    IMAGECOLOR 195 195 195
    TRANSPARENT ON
    INTERLACE OFF
    POSITION UR
    KEYSIZE 20 10 
    KEYSPACING 5 5 
    TEMPLATE "/var/www/html/maplab-2.0rc3/htdocs/mapbrowser/legend_template.html"
    POSTLABELCACHE TRUE
    LABEL
      TYPE BITMAP
      SIZE MEDIUM
      OFFSET 0 0 
      BUFFER 0
      MINDISTANCE -1
      MINFEATURESIZE -1
      COLOR 195 195 195
      OUTLINECOLOR 195 195 195
      SHADOWCOLOR 195 195 195
      SHADOWSIZE 1 1 
      BACKGROUNDCOLOR 195 195 195
      BACKGROUNDSHADOWCOLOR 195 195 195
      BACKGROUNDSHADOWSIZE 1 1 
      PARTIALS TRUE
      FORCE FALSE
    END
  END





More information about the MapServer-users mailing list