<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=412424915-07022005><FONT size=2>Hello--</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>I'm attempting to get the
sample_enhanced.phtml sample working with my own .map file and am having
problems. What I have done is to replace the reference to chameleon.map
with a reference to my map file and to comment out the KEYMAP portion of the
sample_enhanced.html file (since my .map file doesn't have a reference map
object in it.)</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>My basic configuration works
(the other samples work and I did some work with the helpfile/tutorials that
worked).</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>When I open the
sample_enhanced.phtml URL, I get two javascript error popus (one says "image
object for cwcimage_51 not found?" the other says "image object for cwcimage_52
not found?"), then I briefly see the "loading image" graphic and then in the map
window I get the following error:</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>Error rendering map
image:</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>A fatal error has occurred
restoring your session.</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>Please restart the
application</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>The rest of the page looks OK
(legend, zoom/pan buttons, etc., etc.) I can't figure out what the problem
is and would appreciate any help. I know that my configuration works to
the point where it does create map .png files and can find them. And the
.map file I'm referencing works OK outside of the samples environment. But
when hooking it into the samples_enhanced framework, it doesn't seem to be
creating the .png in my /tmp directories and I can't figure out why
not.</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>Here's the .map file that is
being accessed:</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2> MAP<BR> NAME
"MIDAS National Data"<BR> STATUS ON<BR> #EXTENT -125 24 -66
50<BR> EXTENT -3443611 2341541 2185646 6092248<BR> SIZE 600
400<BR> SHAPEPATH "data"<BR> #SYMBOLSET
"/var/www/htdocs/midas/symbols.txt"<BR> #FONTSET
"../etc/fonts.txt"<BR> IMAGETYPE PNG<BR> UNITS METERS<BR>
PROJECTION<BR> "proj=aea"<BR>
"ellps=GRS80"<BR> "lat_1=29.5n"<BR>
"lat_2=45.5n"<BR> "lon_0=90w"<BR>
"no_defs"<BR> END<BR> WEB<BR> #IMAGEPATH
"/var/www/htdocs/gis/tmp/"<BR> IMAGEPATH
"/ms4w/tmp/ms_tmp/"<BR> IMAGEURL "/ms_tmp/"<BR> TEMPLATE
"querytemplate.html"<BR> LOG "/gis/tmp/logit.txt"<BR>
END<BR> LEGEND<BR> STATUS OFF<BR>
KEYSIZE 18 12<BR>
LABEL<BR> TYPE
BITMAP<BR> SIZE
MEDIUM<BR> COLOR 0 0
89<BR> END<BR> TEMPLATE
"/var/www/htdocs/midas/htdocs/legend.html"<BR> END<BR>
QUERYMAP<BR> STATUS ON<BR> SIZE 300
300<BR> COLOR 178 40 100<BR> STYLE
HILITE<BR> END<BR> LAYER<BR> NAME
"Counties"<BR> GROUP "Base"<BR> STATUS
ON<BR> DATA "the_geom from counties"<BR>
TYPE POLYGON<BR> CONNECTIONTYPE POSTGIS<BR>
CONNECTION "user= password= dbname="<BR> SIZEUNITS
PIXELS<BR> PROJECTION<BR>
"proj=latlong"<BR>
"ellps=clrk66"<BR> END<BR>
METADATA<BR> LYRNAME
"Counties"<BR> END<BR>
CLASS<BR> NAME
"Counties"<BR>
STYLE<BR> COLOR 255 255
204<BR> OUTLINECOLOR 215 215
215<BR> END<BR> END<BR>
END<BR> LAYER<BR> NAME "States"<BR>
GROUP "Base"<BR> STATUS ON<BR> DATA
"the_geom from states"<BR> TYPE POLYGON<BR>
CONNECTIONTYPE POSTGIS<BR> CONNECTION "user= password=
dbname="<BR> SIZEUNITS PIXELS<BR>
PROJECTION<BR>
"proj=latlong"<BR>
"ellps=clrk66"<BR> END<BR>
METADATA<BR> LYRNAME
"States"<BR> END<BR>
CLASS<BR> NAME
"States"<BR>
STYLE<BR> OUTLINECOLOR 255 0
0<BR> SIZE
5<BR> END<BR> END<BR>
END<BR>END<BR></FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2>Here's the sample_enhanced.html
file:</FONT></SPAN></DIV>
<DIV><SPAN class=412424915-07022005><FONT size=2><?php<BR>/*<BR> * this
is a sample of a minimal application script required to<BR> * get a
chameleon application running with a template and a<BR> * local map
file. Most applications should actually just<BR> * copy this file and
modify the template and mapfile<BR> * parts and should not need to do a lot
more here.<BR> */<BR>include( "../../htdocs/chameleon.php"
);</FONT></SPAN></DIV>
<DIV> </DIV><SPAN class=412424915-07022005><FONT size=2>
<DIV><BR>$szTemplate = "./sample_enhanced.html";<BR>#$szMapFile =
"../map/chameleon.map";<BR>$szMapFile = "../map/national.map";</DIV>
<DIV> </DIV>
<DIV>class SampleApp extends Chameleon<BR>{<BR> function
SampleApp()<BR> {<BR>
parent::Chameleon();<BR> $this->moMapSession = new
MapSession_RW;<BR> $this->moMapSession->setTempDir(
getSessionSavePath());<BR> }<BR>}</DIV>
<DIV> </DIV>
<DIV>$oApp = new SampleApp();<BR>$oApp->registerSkin( 'skins/sample'
);<BR>$oApp->CWCInitialize( $szTemplate, $szMapFile
);<BR>$oApp->CWCExecute();<BR>?><BR></FONT></SPAN></DIV>
<DIV><FONT size=2></FONT> </DIV><!-- Converted from text/plain format -->
<P><FONT size=2>-----------------------------------------<BR>Bill Wheaton<BR>RTI
International<BR>P.O. 12194, 3040 Cornwallis Rd.<BR>RTP, NC
27709<BR>wdw@rti.org, 919-541-6158 (V), 919-541-8830 (F)<BR><BR></FONT></P>
<DIV> </DIV></BODY></HTML>