[Chameleon] Problem in Print widget

Paul Spencer pagameba at magma.ca
Fri Apr 16 09:29:17 EDT 2004


Stephanie,

this is a limitation of Chameleon/MapServer right now that we will be 
working to address in the near future.  Basically the support for 
GetLegendGraphic has been added for MapServer WMS Server but not for WMS 
Client so the legend template processor is not seeing the url to the 
legend graphic.

I would hope that this would be fixed by mid summer.

Paul

Choi,Stephanie [Ontario] wrote:

> 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=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>"/>
> 
>           </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&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>"
> 
>         "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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



More information about the Chameleon mailing list