|
||||
[Chameleon] Problems getting started ...Paul Spencer spencer@dmsolutions.caWed, 17 Dec 2003 18:34:34 -0500
|
JF ... there is a small bug in the sample app code, if you open the index.phtml file and change it to look like this: <? /* * this is a sample of a minimal application script required to * get a chameleon application running with a template and a * local map file. Most applications should actually just * copy this file and modify the template and mapfile * parts and should not need to do a lot more here. */ include( "/ms4w/apps/chameleon/htdocs/chameleon.php" ); $szTemplate = "sample.html"; $szMapFile = "/ms4w/apps/chameleon_sample/map/chameleon.map"; class SampleApp extends Chameleon { function SampleApp() { parent::Chameleon(); $this->moMapSession = new MapSession_RW; $this->moMapSession->setTempDir( getSessionSavePath()); } } $oApp = new SampleApp(); $oApp->CWCInitialize( $szTemplate, $szMapFile ); $oApp->CWCExecute(); ?> The real culprit are the two $this->moMapSession lines, they need to be moved from where they are into the constructor. Just making that change will fix the problem, although the above is the cleanest I could come up with ... and will become the sample app on its next release (I hope). Also, it should work (faster) to remove the two $this->moMapSession lines which would cause the chameleon framework to work in MapSession_R mode (read only) which should be faster but doesn't allow persistent changes like adding layers. If you want to be able to add layers then leave the two lines in. Cheers, Paul Jean-Francois.Doyon@ccrs.nrcan.gc.ca wrote: > Bart, > > Ah ... Yes indeed I was ! I forgot about that sample app ... things work > much better now ! > > One last thing: > > Actions on the map do nothing but return the previous map, so basically I'm > stuck at the initial view ... If I try to zoom in the map does refresh and > so on, but I get the same map I was at before ... > > Once I get that working I right I should be on my way ! > > Thanks for all the help, > J.F. > > -----Original Message----- > From: Bart van den Eijnden [mailto:bartvde@xs4all.nl] > Sent: Wednesday, December 17, 2003 4:15 PM > To: Jean-Francois.Doyon@CCRS.NRCan.gc.ca; chameleon@lists.maptools.org > Subject: Re: [Chameleon] Problems getting started ... > > > Hi Jean-Francois, > > in an earlier post you said you were using Chameleon 1.1 Alpha 6. > > I think what you are trying now is the Chameleon 1.0 way > (/chameleon/chameleon.php?TEMPLATE=demo.html&CONTEXT=gmap_context.xml). > > Try installing the Chameleon sample application and then run that by > trying the URL (create the sample_app alias to "sampleapp"/htdocs > directory): > > /sample_app/index.phtml > > Make sure the paths in index.phtml to MAP/Context file and template are > correct. > > Best regards, > Bart > > On Wed, 17 Dec 2003 16:04:12 -0500, <Jean-Francois.Doyon@CCRS.NRCan.gc.ca> > wrote: > > >>OK, so I've got PHP 4.3.3 compiled the way I want to, as well as >>mapserver/mapscript. (Except that I've hacked PHP/MapScript to work with >>PHP >>as a module for Apache to test the thread safety). >> >>I've also configured cwc2.xml and renamed it removing the -dist ... >> >>I've made the web user owner of the data directory ... >> >>I've added /tmp/ms_tmp and /tmp/ms_tmp/buttons ... >> >>And I've aliased as such: >> >> Alias /ms_tmp/ /tmp/ms_tmp/ >> >> Alias /chameleon/ /usr/local/chameleon/htdocs/ >> >>Now I'm trying the following URL: >> >>/chameleon/chameleon.php?TEMPLATE=demo.html&CONTEXT=gmap_context.xml >> >>And am just getting a blank page ... >> >>To be exact, it contains the following code: >> >><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> >><HTML><HEAD> >><META http-equiv=Content-Type content="text/html; >>charset=windows-1252"></HEAD> >><BODY></BODY></HTML> >> >>I've also built the "wmsparse" utility. >> >>I guess I'm missing something but I'm all out of ideas ! >> >>Find my cwc2.xml attached. <<cwc2.xml>> >> >>Any help would be greatly appreciated ! >> >>Thanks, >> >>Jean-François Doyon >>Internet Service Development and Systems Support / Développement des >>services et soutien de systèmes Internet >>GeoAccess Division / Division GéoAccès >>Canada Center for Remote Sensing / Centre canadien de télédétection >>Natural Resources Canada / Ressources naturelles Canada >>http://atlas.gc.ca >>Phone: (613) 992-4902 >>Fax: (613) 947-2410 >> > > > > -- ----------------------------------------------------------------- |Paul Spencer spencer@dmsolutions.ca | |-----------------------------------------------------------------| |Applications & Software Development | |DM Solutions Group Inc http://www.dmsolutions.ca/| -----------------------------------------------------------------
This archive was generated by Pipermail. |
MapTools.org -- Hosted by DM Solutions Group |