[Chameleon] CWC2 and PROJ

Pagurek,Debbie [NCR] Debbie.Pagurek at ec.gc.ca
Wed Oct 12 09:43:08 EDT 2005


Paul,
We could definitely alter the cwc2.php script because we already have
been doing that, but I don't know how to set the CONFIG property here -
I tried the following but got an error. Is it even possible to set the
CONFIG in a mapfile via php/mapscript? 

$oApp->moMapSession->oMap->set('CONFIG','PROJ_LIB "C:/ms4w/proj/nad/"'
);

Fatal error: Property 'CONFIG' does not exist in this object. in
C:\ms4w\apps\chameleon\cwc2\htdocs\cesicwc2.php on line 716

Any other suggestions? I thought that maybe cwc2 used some sort of
default.map that is stored as a file and then alters that base mapfile.
That would be ideal because then we could just tweak the base mapfile.
But no - that doesn't seem to be what it does - it just writes out a
mapfile from scratch. 
Any other suggestions? 

We tried setting a PROJ_LIB system variable (We're on a Windows 2003
server) but that didn't seem to have any affect whatsoever. Is it
necessary to reboot the server after setting a system variable?

Obviously our final option is just putting the proj directory in c:, but
yuck - that's not where we want it.

Debbie

-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Paul Spencer
Sent: Tuesday, October 11, 2005 10:48 PM
To: Avramov,Daniel [Ontario]
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] CWC2 and PROJ


Daniel,

I believe you might be able to put this into an apache SetEnv  
directive and get it to work, and you might be able to do the same  
for IIS (but I would have no clue how to do that!).  Unfortunately,  
as is, cwc2 builds a map object entirely using mapscript and doesn't  
provide the opportunity to do this.  It would probably be an easy  
hack to add it into your cwc2.php though.  You would probably want to  
do it around line 711 where the imageurl and imagepath is set.   
Ultimately, this would become a setting in cwc2.xml ...

Cheers

Paul

On 11-Oct-05, at 4:54 PM, Avramov,Daniel [Ontario] wrote:

> We've been experiencing issues with getting the PROJ_LIB working
> properly
> If we put the proj directory in c:\    cwc2 will work fine but we  
> want it in another directory/drive.
>
> cwc2 builds its own MapFile and doesn't write CONFIG PROJ_LIB ...
> out into that MapFIle.
> Is it possible to use php_mapscript to write to that MapFile to set  
> the config proj_lib appropriately?
>
> OR
>
> Does Chameleon / cwc2 use a base Mapfile or code that can be
> altered that we could add the config proj_lib setting to so that  
> cwc2 will work?
>
> Would the following code placed in the proper file do anything to
> help?
> putenv( "PROJ_LIB=e:\mapapps\ms461_c22_php4311\proj\nad" );
>
>
> Thanks,
> Daniel and Debbie.
>
>
>
> _______________________________________________
> 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/|
+-----------------------------------------------------------------+




_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon



More information about the Chameleon mailing list