[Chameleon] Problem in Print widget
Choi,Stephanie [Ontario]
Stephanie.Choi at ec.gc.ca
Fri Apr 16 09:07:35 EDT 2004
Hi all,
I got a problem when using print widget in Chameleon 1.0. I am running
it with the development version of Mapserver which I got from cvs. When
I preview the map with legend in it, the legend icons showed as "?"
instead of the symbols I have set. I understand that Chameleon takes a
context file as an input and then uses it to generate an updated mapfile
whenever a change is made to the application. Therefore, I have created
the following context file for testing the creation of legend icons:
A Test context file:
<LayerList>
<Layer queryable="0" hidden="0">
<Server service="WMS" version="1.1.1"
title="Aviation_Surface_Weather_Network">
<OnlineResource xlink:type="simple"
xlink:href="http://localhost/cgi-bin/wms?"/>
</Server>
<Name>Aviation_Surface_Weather_Network</Name>
<Title>Aviation_Surface_Weather_Network</Title>
<SRS>EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:42304</SRS>
<FormatList>
<Format current="1">image/png</Format>
<Format>image/jpeg</Format>
<Format>image/wbmp</Format>
</FormatList>
<StyleList>
<Style current="1">
<Name>avn</Name>
<Title>avn</Title>
<LegendURL width="18" height="12" format="image/png">
<OnlineResource xlink:type="simple"
xlink:href="http://localhost/cgi-bin/wms?version=1.1.1&request=GetLe
gendGraphic&Layer=Aviation_Surface_Weather_Network&format=image%
2Fpng&simple=true"/>
</LegendURL>
</Style>
</StyleList>
</Layer>
</LayerList>
And the mapfile it generated is :
LEGEND
IMAGECOLOR 255 255 255
KEYSIZE 18 12
KEYSPACING 5 5
LABEL
SIZE MEDIUM
TYPE BITMAP
BUFFER 0
COLOR 0 0 89
FORCE FALSE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
END
POSITION LL
STATUS ON
TEMPLATE "legend_template.html"
END
LAYER
CONNECTION "http://142.97.246.104/cgi-bin/envirodat?"
CONNECTIONTYPE WMS
METADATA
"wms_srs" "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326
EPSG:42304"
"wms_onlineresource"
"http://142.97.246.104/cgi-bin/envirodat?"
"wms_style_avn_legendurl_width" "18"
"wms_name" "Aviation_Surface_Weather_Network"
"wms_style_avn_title" "avn"
"wms_style_avn_legendurl_format" "image/png"
"wms_style_avn_legendurl_height" "12"
"wms_formatlist" "image/png,image/jpeg,image/wbmp"
"wms_format" "image/png"
"LEGEND_ORDER" "0"
"wms_style_avn_legendurl_href"
"http://localhost/cgi-bin/wms?version=1.1.1&request=GetLegendGraphic&Lay
er=Aviation_Surface_Weather_Network&format=image%2Fpng&simple=true"
"wms_server_version" "1.1.1"
"wms_stylelist" "avn"
"wms_style" "avn"
"wms_title" "Aviation_Surface_Weather_Network"
END
NAME "l0:Aviation_Surface_Weather_Network"
SIZEUNITS PIXELS
STATUS ON
TOLERANCE 0
TOLERANCEUNITS PIXELS
TYPE RASTER
UNITS METERS
END
However, when I started up Chameleon 1.0 with the above context file I
got the following error and the image doesn't generate at all:
"msWMSLoadGetMapParams(): Invalid style ((null)) Mapserver supports only
default styles and is expecting and empty string for the STYLES= or
STYLES=,,,,"
I know I mess up something somewhere in the context file or anywhere
else. Does anyone have any idea on what did I set up wrongly and does
anyone know a proper way to make the legend icons show up in the preview
? I am a new to Chameleon if I understood anything wrongly, just point
me out. Any help would be greatly appreciated.
Thanks in advance,
Stephanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20040416/d60102ab/attachment-0001.htm
More information about the Chameleon
mailing list