<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6487.1">
<TITLE>Problem in preview widget</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi all,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I got a question about the preview widget. I am working with Chameleon 1.0 and Mapserver-dev version which is the latest one I got from cvs. And when I includes legend to be displayed in the preview, it shows the default icons which is the "?" instead of the symbols that I set to them. I understand that in Chameleon 1.0, it uses a context file to create an updated mapfile whenever a change is made to the application. And I found out that those legend icons are created from the legendurls which are included in the context file within each style block. Therefore, I made the following test context file for testing the creation of legend icons in preview:</FONT></P>
<P><FONT SIZE=1 FACE="Arial"><?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?></FONT>
<BR><FONT SIZE=1 FACE="Arial"><ViewContext version="1.0.0" id="envirodat_wms" xmlns:xsi="<A HREF="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>" xmlns:xlink="<A HREF="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</A>" xmlns="<A HREF="http://www.opengis.net/context">http://www.opengis.net/context</A>" xsi:schemaLocation="<A HREF="http://www.opengis.net/context">http://www.opengis.net/context</A> </FONT><A HREF="http://schemas.opengis.net/context/1.0.0/context.xsd"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial">http://schemas.opengis.net/context/1.0.0/context.xsd</FONT></U></A><FONT SIZE=1 FACE="Arial">"></FONT></P>
<P><FONT SIZE=1 FACE="Arial"> <!-- LayerList of Layer elements</FONT>
<BR><FONT SIZE=1 FACE="Arial"> - implied order: bottom To Top</FONT>
<BR><FONT SIZE=1 FACE="Arial"> first Layer element is bottom most layer in map view</FONT>
<BR><FONT SIZE=1 FACE="Arial"> last Layer elements is op most layer in map view</FONT>
<BR><FONT SIZE=1 FACE="Arial"> --></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <LayerList></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Layer queryable="0" hidden="0"></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Server service="WMS" version="1.1.1" title="Aviation_Surface_Weather_Network"></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <OnlineResource xlink:type="simple" xlink:href="<A HREF="http://localhost/cgi-bin/wms">http://localhost/cgi-bin/wms</A>?"/></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </Server></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Name>Aviation_Surface_Weather_Network</Name></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Title>Aviation_Surface_Weather_Network</Title></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <SRS>EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:42304</SRS></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <FormatList></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Format current="1">image/png</Format></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Format>image/jpeg</Format></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Format>image/wbmp</Format></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </FormatList></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <StyleList></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Style current="1"></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Name>avn</Name></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <Title>avn</Title></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <LegendURL width="18" height="12" format="image/png"></FONT>
<BR><FONT SIZE=1 FACE="Arial"> <OnlineResource xlink:type="simple" xlink:href="<A HREF="http://localhost/cgi-bin/wms?version=1.1.1&request=GetLegendGraphic&Layer=Aviation_Surface_Weather_Network&format=image%2Fpng&simple=true">http://localhost/cgi-bin/wms?version=1.1.1&request=GetLegendGraphic&Layer=Aviation_Surface_Weather_Network&format=image%2Fpng&simple=true</A>"/></FONT></P>
<P><FONT SIZE=1 FACE="Arial"> </LegendURL></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </Style></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </StyleList></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </Layer></FONT>
<BR><FONT SIZE=1 FACE="Arial"> </LayerList></FONT>
<BR><FONT SIZE=1 FACE="Arial"></ViewContext></FONT>
</P>
<P><FONT SIZE=1 FACE="Arial">Here is the corresponding mapfile that generated by Chameleon:</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial">MAP</FONT>
<BR><FONT SIZE=1 FACE="Arial"> EXTENT -2594561.35333333 -712631 3467361.35333333 3840000</FONT>
<BR><FONT SIZE=1 FACE="Arial"> FONTSET "/var/www/html/cwc2/etc/fonts.txt"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGECOLOR 255 255 255</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGETYPE png</FONT>
<BR><FONT SIZE=1 FACE="Arial"> RESOLUTION 90.714286</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SYMBOLSET "/var/www/html/cwc2/etc/symbols.sym"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE 400 300</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TRANSPARENT TRUE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> UNITS METERS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> NAME "envirodat_wms"</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> OUTPUTFORMAT</FONT>
<BR><FONT SIZE=1 FACE="Arial"> NAME png</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MIMETYPE image/png</FONT>
<BR><FONT SIZE=1 FACE="Arial"> DRIVER GD/PNG</FONT>
<BR><FONT SIZE=1 FACE="Arial"> EXTENSION png</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGEMODE PC256</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TRANSPARENT TRUE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> PROJECTION</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "init=epsg:42304"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
<BR><FONT SIZE=1 FACE="Arial"> LEGEND</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGECOLOR 255 255 255</FONT>
<BR><FONT SIZE=1 FACE="Arial"> KEYSIZE 18 12</FONT>
<BR><FONT SIZE=1 FACE="Arial"> KEYSPACING 5 5</FONT>
<BR><FONT SIZE=1 FACE="Arial"> LABEL</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE MEDIUM</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TYPE BITMAP</FONT>
<BR><FONT SIZE=1 FACE="Arial"> BUFFER 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> COLOR 0 0 89</FONT>
<BR><FONT SIZE=1 FACE="Arial"> FORCE FALSE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MINDISTANCE -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MINFEATURESIZE -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> OFFSET 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> PARTIALS TRUE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
<BR><FONT SIZE=1 FACE="Arial"> POSITION LL</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TEMPLATE "legend_template.html"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> QUERYMAP</FONT>
<BR><FONT SIZE=1 FACE="Arial"> COLOR 255 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE -1 -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS OFF</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STYLE HILITE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> REFERENCE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> COLOR -1 -1 -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> EXTENT -1 -1 -1 -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGE "./images/keymap.png"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> OUTLINECOLOR 255 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE 120 90</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MARKER 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MARKERSIZE 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MINBOXSIZE 3</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MAXBOXSIZE 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> SCALEBAR</FONT>
<BR><FONT SIZE=1 FACE="Arial"> BACKGROUNDCOLOR 0 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> COLOR 255 255 255</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGECOLOR 255 255 255</FONT>
<BR><FONT SIZE=1 FACE="Arial"> INTERVALS 5</FONT>
<BR><FONT SIZE=1 FACE="Arial"> LABEL</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE SMALL</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TYPE BITMAP</FONT>
<BR><FONT SIZE=1 FACE="Arial"> BUFFER 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> COLOR 0 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> FORCE FALSE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MINDISTANCE -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> MINFEATURESIZE -1</FONT>
<BR><FONT SIZE=1 FACE="Arial"> OFFSET 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> PARTIALS TRUE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> POSITION CR</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
<BR><FONT SIZE=1 FACE="Arial"> OUTLINECOLOR 0 0 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> POSITION LL</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZE 300 5</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STYLE 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TRANSPARENT TRUE</FONT>
<BR><FONT SIZE=1 FACE="Arial"> UNITS KILOMETERS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> WEB</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGEPATH "/var/www/html/cwc2/tmp/images/"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> IMAGEURL "/image_tmp/"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> LOG "error.log"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> METADATA</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "original_projection" "init=epsg:42304"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_connectiontimeout" "3000"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "original_extents" "-2200000,-712631,3072800,3840000"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_context_version" "1.0.0"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_title" "WMS Demo"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
<BR><FONT SIZE=1 FACE="Arial"> QUERYFORMAT text/html</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial"> LAYER</FONT>
<BR><FONT SIZE=1 FACE="Arial"> CONNECTION "</FONT><A HREF="http://localhost/cgi-bin/wms?"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial">http://localhost/cgi-bin/wms?</FONT></U></A><FONT SIZE=1 FACE="Arial">"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> CONNECTIONTYPE WMS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> METADATA</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_srs" "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:42304"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_onlineresource" "</FONT><A HREF="http://localhsot/cgi-bin/wms?"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial">http://localhsot/cgi-bin/wms?</FONT></U></A><FONT SIZE=1 FACE="Arial">"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style_avn_legendurl_width" "18"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_name" "Aviation_Surface_Weather_Network"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style_avn_title" "avn"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style_avn_legendurl_format" "image/png"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style_avn_legendurl_height" "12"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_formatlist" "image/png,image/jpeg,image/wbmp"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_format" "image/png"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "LEGEND_ORDER" "0"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style_avn_legendurl_href" "</FONT><A HREF="http://localhost/cgi-bin/wms?version=1.1.1&request=GetLegendGraphic&Layer=Aviation_Surface_Weather_Network&format=image%2Fpng&simple=true"><U><FONT COLOR="#0000FF" SIZE=1 FACE="Arial">http://localhost/cgi-bin/wms?version=1.1.1&request=GetLegendGraphic&Layer=Aviation_Surface_Weather_Network&format=image%2Fpng&simple=true</FONT></U></A><FONT SIZE=1 FACE="Arial">"</FONT></P>
<P><FONT SIZE=1 FACE="Arial"> "wms_server_version" "1.1.1"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_stylelist" "avn"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_style" "avn"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> "wms_title" "Aviation_Surface_Weather_Network"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
<BR><FONT SIZE=1 FACE="Arial"> NAME "l0:Aviation_Surface_Weather_Network"</FONT>
<BR><FONT SIZE=1 FACE="Arial"> SIZEUNITS PIXELS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> STATUS ON</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TOLERANCE 0</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TOLERANCEUNITS PIXELS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> TYPE RASTER</FONT>
<BR><FONT SIZE=1 FACE="Arial"> UNITS METERS</FONT>
<BR><FONT SIZE=1 FACE="Arial"> END</FONT>
</P>
<P><FONT SIZE=1 FACE="Arial">END</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">However, when I starts Chameleon 1.0 with this context file, I got the following error and the map image doesn't generate at all:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">"msWMSLoadGetMapParams (): Invalid style ((null)) Mapserver supports only default styles and is expecting an empty string for the STYLES: or STYLES=,,,,"</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Does anyone have any idea on this problem ? I guess I am missing something or messing up something in the mapfile or context file. If anyone knows the proper way to set up this, please let me know. Hey I am a newbie to the Chameleon, so if I misunderstood anything, just let me know :)</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Any help would be greatly appreciated.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Stephanie </FONT>
</P>
</BODY>
</HTML>