[Chameleon] Problem in preview widget

Choi,Stephanie [Ontario] Stephanie.Choi at ec.gc.ca
Fri Apr 16 11:48:20 EDT 2004


Please ignore this.  Thanks!

	-----Original Message-----
	From: Choi,Stephanie [Ontario] 
	Sent: Thursday, April 15, 2004 2:56 PM
	To: chameleon at lists.maptools.org
	Subject: [Chameleon] Problem in preview widget
	
	

	Hi all, 

	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:

	<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> 
	<ViewContext version="1.0.0" id="envirodat_wms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.opengis.net/context"
xsi:schemaLocation="http://www.opengis.net/context
http://schemas.opengis.net/context/1.0.0/context.xsd
<http://schemas.opengis.net/context/1.0.0/context.xsd> ">

	  <!-- LayerList of Layer elements 
	       - implied order: bottom To Top 
	       first Layer element is bottom most layer in map view 
	       last Layer elements is op most layer in map view 
	  --> 
	  <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=GetLegend
Graphic&Layer=Aviation_Surface_Weather_Network&format=image%2Fpng&simple
=true"/>

	          </LegendURL> 
	        </Style> 
	      </StyleList> 
	    </Layer> 
	  </LayerList> 
	</ViewContext> 

	Here is the corresponding mapfile that generated by Chameleon: 

	MAP 
	  EXTENT -2594561.35333333 -712631 3467361.35333333 3840000 
	  FONTSET "/var/www/html/cwc2/etc/fonts.txt" 
	  IMAGECOLOR 255 255 255 
	  IMAGETYPE png 
	  RESOLUTION 90.714286 
	  SYMBOLSET "/var/www/html/cwc2/etc/symbols.sym" 
	  SIZE 400 300 
	  STATUS ON 
	  TRANSPARENT TRUE 
	  UNITS METERS 
	  NAME "envirodat_wms" 

	  OUTPUTFORMAT 
	    NAME png 
	    MIMETYPE image/png 
	    DRIVER GD/PNG 
	    EXTENSION png 
	    IMAGEMODE PC256 
	    TRANSPARENT TRUE 
	  END 

	  PROJECTION 
	    "init=epsg:42304" 
	  END 
	  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 

	  QUERYMAP 
	      COLOR 255 0 0 
	    SIZE -1 -1 
	    STATUS OFF 
	    STYLE HILITE 
	  END 

	  REFERENCE 
	    COLOR -1 -1 -1 
	    EXTENT -1 -1 -1 -1 
	    IMAGE "./images/keymap.png" 
	    OUTLINECOLOR 255 0 0 
	    SIZE 120 90 
	    STATUS ON 
	      MARKER 0 
	      MARKERSIZE 0 
	      MINBOXSIZE 3 
	      MAXBOXSIZE 0 
	  END 

	  SCALEBAR 
	      BACKGROUNDCOLOR 0 0 0 
	      COLOR 255 255 255 
	    IMAGECOLOR 255 255 255 
	    INTERVALS 5 
	    LABEL 
	      SIZE SMALL 
	      TYPE BITMAP 
	      BUFFER 0 
	      COLOR 0 0 0 
	      FORCE FALSE 
	      MINDISTANCE -1 
	      MINFEATURESIZE -1 
	      OFFSET 0 0 
	      PARTIALS TRUE 
	      POSITION CR 
	    END 
	      OUTLINECOLOR 0 0 0 
	    POSITION LL 
	    SIZE 300 5 
	    STATUS ON 
	    STYLE 0 
	    TRANSPARENT TRUE 
	    UNITS KILOMETERS 
	  END 

	  WEB 
	    IMAGEPATH "/var/www/html/cwc2/tmp/images/" 
	    IMAGEURL "/image_tmp/" 
	    LOG "error.log" 
	      METADATA 
	        "original_projection"   "init=epsg:42304" 
	        "wms_connectiontimeout" "3000" 
	        "original_extents"
"-2200000,-712631,3072800,3840000" 
	        "wms_context_version"   "1.0.0" 
	        "wms_title"     "WMS Demo" 
	      END 
	    QUERYFORMAT text/html 
	  END 

	  LAYER 
	    CONNECTION "http://localhost/cgi-bin/wms?
<http://localhost/cgi-bin/wms?> " 
	    CONNECTIONTYPE WMS 
	      METADATA 
	        "wms_srs"       "EPSG:42304 EPSG:42101 EPSG:4269
EPSG:4326 EPSG:42304" 
	        "wms_onlineresource"    "http://localhsot/cgi-bin/wms?
<http://localhsot/cgi-bin/wms?> " 
	        "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
<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 

	END 

	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:

	"msWMSLoadGetMapParams (): Invalid style ((null)) Mapserver
supports only default styles and is expecting an empty string for the
STYLES: or STYLES=,,,,"

	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 :)

	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/c9649e1f/attachment.htm


More information about the Chameleon mailing list