[Chameleon] CWC2 and PROJ
Pagurek,Debbie [NCR]
Debbie.Pagurek at ec.gc.ca
Fri Oct 14 08:57:36 EDT 2005
This is excellent, and eventually we'll be using it in our modified
cwc2.php for our cwc2 application. I guess the next question is when MS
4.8 will be released because we won't be able to put a dev version on
our production servers here. In the meantime we'll continue to put PROJ
in C: as our solution.
Thanks for the update!
Debbie
-----Original Message-----
From: Yewondwossen Assefa [mailto:assefa at dmsolutions.ca]
Sent: Thursday, October 13, 2005 1:16 PM
To: Pagurek,Debbie [NCR]
Cc: Paul Spencer; Avramov,Daniel [Ontario]; chameleon at lists.maptools.org
Subject: Re: [Chameleon] CWC2 and PROJ
Just a side not about the config settings : It was added today into php
mapscript (bug 1497). The functions available are :
string getconfigoption(string key)
Returns the config value associated with the key.
Returns an empty sting if key not found.
int setconfigoption(string key, string value)
Sets a config parameter using the key and the value passed
int applyconfigoptions()
Applies the config options set in the map file. For example
seeting the PROJ_LIB using the setconfigoption only modifies
the value in the map object. applyconfigoptions will actually
change the PROJ_LIB value that will be used when dealing with
projection.
Later,
Pagurek,Debbie [NCR] wrote:
> 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
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the Chameleon
mailing list