[Mapserver-users] Legend Titles/Sub-titles

Rebecca Colwell colwell at geog.umn.edu
Wed Aug 4 10:38:10 PDT 2004


Hi all,

I am working on a mapping app with multiple thematic layers viewable at 
one time.  I'm trying to title each map layer within the legend in bold 
and then have the text next to each color be in plain text.

My mapfile legend looks like this:

   #
   # Start of legend
   #
   LEGEND
     STATUS ON
     KEYSIZE 25 18
     LABEL
         TYPE TRUETYPE
     FONT times
     COLOR 0 0 0
     SIZE 11
     ANTIALIAS TRUE
     END
   END

Each layer has a metadata tag like this:

     METADATA
         "TITLE" "All Disenfranchised Felons"
     END

And in my html code, I have the following for the legend:

	<p><big>Legend:</big><br>
	<big>[TotalDisRate_TITLE][AfrAmerDisRate_TITLE]
	     [StateVotingRights_TITLE]</big><br>
	<img name="legend" src="[legend]"></p>

Right now, the layers and titles appear in the legend, but all the 
titles appear one after the other, and are then followed by all the 
titleless layers.

Does anyone know how I could modify the legend to have a 
title/layer/title/layer appearance as opposed to a 
title/title/layer/layer appearance?

Thanks!

~Becky







More information about the MapServer-users mailing list