[Mapserver-users] (no subject)
Hudspeth, Bill
bhudspeth at edac.unm.edu
Mon Dec 9 13:52:26 PST 2002
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_01C29FCD.436A0990
Content-Type: text/plain;
charset="iso-8859-1"
I am having problems getting the HTRL Legend to work. I continue to get the
following error message:
Content-type: text/html generateLegendTemplate(): Unable to access file.
Error while opening template file.
Also, in the Legend Template file, must I actually create graphic images to
which the [leg_icon] tag points?
I reproduce the relevant code below:
Thanks, Bill
Mapfile code
LEGEND
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
TEMPLATE legend.html
END
...
...
...
LAYER
NAME "nm_shadedgray"
DATA "nm_shadedgray.tif"
TYPE RASTER
STATUS DEFAULT
END
LAYER
NAME hydrology_utm27
TYPE LINE
STATUS DEFAULT
DATA "hydrology_utm27"
HEADER 'air_header.html'
CLASS
#Name 'Hydrology'
COLOR 64 64 192
OUTLINECOLOR 0 0 0
END # CLASS
END # LAYER
LAYER
NAME county_utm27
TYPE LINE
STATUS DEFAULT
DATA "county_utm27"
HEADER 'air_header.html'
CLASS
#Name 'County'
COLOR 0 0 0
OUTLINECOLOR 0 0 0
END # CLASS
END # LAYER
LAYER
NAME cities_utm27
TYPE POINT
STATUS DEFAULT
DATA cities_utm27
HEADER 'air_header.html'
CLASS
#Name 'Cities'
COLOR 162 63 21
OUTLINECOLOR 128 128 128
SIZE 20
END # CLASS
END # LAYER
TEMPLATE file
<font size=+1><b>Legend</b></font><br><hr>
[legend]<hr>
LEGEND TEMPLATE file
[leg_class_html opt_flag=15] <img src=[leg_icon]> [leg_class_name]
[/leg_class_html]
*********************************************************************
*********************************************************************
William Hudspeth, PhD
Earth Data Analysis Center
107 Bandelier Hall West
University of New Mexico
Albuquerque, NM 87131
(505) 277-3622, ext. 238
bhudspeth at edac.unm.edu
wbhk at unm.edu
------_=_NextPart_001_01C29FCD.436A0990
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.2653.12">
<TITLE></TITLE>
</HEAD>
<BODY>
<P><FONT FACE=3D"Times New Roman">I am having problems getting the HTRL =
Legend to work. I continue to get the following error message:</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">Content-type: text/html =
generateLegendTemplate(): Unable to access file. Error while opening =
template file.</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">Also, in the Legend Template file, =
must I actually create graphic images to which the [leg_icon] tag =
points? </FONT>
</P>
<P><FONT FACE=3D"Times New Roman">I reproduce the relevant code =
below:</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">Thanks, Bill</FONT>
</P>
<BR>
<P><U><FONT FACE=3D"Times New Roman">Mapfile code</FONT></U>
</P>
<P><FONT FACE=3D"Times New Roman">LEGEND</FONT>
<BR><FONT FACE=3D"Times New Roman"> STATUS ON</FONT>
<BR><FONT FACE=3D"Times New Roman"> KEYSIZE 18 12</FONT>
<BR><FONT FACE=3D"Times New Roman"> LABEL</FONT>
<BR><FONT FACE=3D"Times New Roman"> TYPE =
BITMAP</FONT>
<BR><FONT FACE=3D"Times New Roman"> SIZE =
MEDIUM</FONT>
<BR><FONT FACE=3D"Times New Roman"> COLOR 0 0 =
89</FONT>
<BR><FONT FACE=3D"Times New Roman"> END</FONT>
<BR><FONT FACE=3D"Times New Roman"> TEMPLATE legend.html</FONT>
<BR><FONT FACE=3D"Times New Roman">END</FONT>
<BR><FONT FACE=3D"Times New Roman">...</FONT>
<BR><FONT FACE=3D"Times New Roman">...</FONT>
<BR><FONT FACE=3D"Times New Roman">...</FONT>
<BR><FONT FACE=3D"Times New Roman">LAYER</FONT>
<BR><FONT FACE=3D"Times New Roman"> NAME =
"nm_shadedgray"</FONT>
<BR><FONT FACE=3D"Times New Roman"> DATA =
"nm_shadedgray.tif"</FONT>
<BR><FONT FACE=3D"Times New Roman"> TYPE RASTER</FONT>
<BR><FONT FACE=3D"Times New Roman"> STATUS DEFAULT</FONT>
<BR><FONT FACE=3D"Times New Roman">END</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">LAYER</FONT>
<BR><FONT FACE=3D"Times New Roman"> NAME hydrology_utm27</FONT>
<BR><FONT FACE=3D"Times New Roman"> TYPE LINE</FONT>
<BR><FONT FACE=3D"Times New Roman"> STATUS DEFAULT</FONT>
<BR><FONT FACE=3D"Times New Roman"> DATA =
"hydrology_utm27"</FONT>
<BR><FONT FACE=3D"Times New Roman"> HEADER =
'air_header.html'</FONT>
<BR><FONT FACE=3D"Times New Roman"> =
CLASS</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> #Name =
'Hydrology'</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> COLOR 64 64 =
192</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> OUTLINECOLOR 0 0 =
0</FONT>
<BR><FONT FACE=3D"Times New Roman"> END # =
CLASS</FONT>
<BR><FONT FACE=3D"Times New Roman">END # LAYER</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">LAYER</FONT>
<BR><FONT FACE=3D"Times New Roman"> NAME county_utm27</FONT>
<BR><FONT FACE=3D"Times New Roman"> TYPE LINE</FONT>
<BR><FONT FACE=3D"Times New Roman"> STATUS DEFAULT</FONT>
<BR><FONT FACE=3D"Times New Roman"> DATA =
"county_utm27"</FONT>
<BR><FONT FACE=3D"Times New Roman"> HEADER =
'air_header.html'</FONT>
<BR><FONT FACE=3D"Times New Roman"> =
CLASS</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> #Name 'County'</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> COLOR 0 0 0</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> OUTLINECOLOR 0 0 =
0</FONT>
<BR><FONT FACE=3D"Times New Roman"> END # =
CLASS</FONT>
<BR><FONT FACE=3D"Times New Roman">END # LAYER</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">LAYER</FONT>
<BR><FONT FACE=3D"Times New Roman"> NAME cities_utm27</FONT>
<BR><FONT FACE=3D"Times New Roman"> TYPE POINT</FONT>
<BR><FONT FACE=3D"Times New Roman"> STATUS DEFAULT</FONT>
<BR><FONT FACE=3D"Times New Roman"> DATA cities_utm27</FONT>
<BR><FONT FACE=3D"Times New Roman"> HEADER =
'air_header.html'</FONT>
<BR><FONT FACE=3D"Times New Roman"> =
CLASS</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> #Name 'Cities'</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> COLOR 162 63 =
21</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> OUTLINECOLOR 128 128 =
128</FONT>
<BR><FONT FACE=3D"Times New =
Roman"> SIZE 20</FONT>
<BR><FONT FACE=3D"Times New Roman"> END # =
CLASS</FONT>
</P>
<P><FONT FACE=3D"Times New Roman">END # LAYER</FONT>
</P>
<P><U><FONT FACE=3D"Times New Roman">TEMPLATE file</FONT></U>
</P>
<P><FONT FACE=3D"Times New Roman"><font =
size=3D+1><b>Legend</b></font><br><hr><=
/FONT>
<BR><FONT FACE=3D"Times New Roman"> =
[legend]<hr></FONT>
</P>
<P><U><FONT FACE=3D"Times New Roman">LEGEND TEMPLATE file</FONT></U>
</P>
<P><FONT FACE=3D"Times New Roman">[leg_class_html opt_flag=3D15] =
<img src=3D[leg_icon]> [leg_class_name] [/leg_class_html]</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<P><FONT SIZE=3D2 =
FACE=3D"Arial">*********************************************************=
************</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">*********************************************************=
************</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">William Hudspeth, PhD</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Earth Data Analysis Center</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">107 Bandelier Hall West</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">University of New Mexico</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Albuquerque, NM 87131</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(505) 277-3622, ext. 238</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bhudspeth at edac.unm.edu</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">wbhk at unm.edu</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C29FCD.436A0990--
More information about the MapServer-users
mailing list