[Chameleon] correct way to use a WMC for app configuration

Paul Spencer pspencer at dmsolutions.ca
Tue Jan 24 12:45:08 EST 2006


Hi Bart,

try taking a look at how the cwc2.php file does it (around line 709 -  
729).  I think you'll find that these are required and there is  
really no way to get around them.  Actually, thinking about it,  
loadContext loads the context into an existing map object, so perhaps  
the best/most portable way of doing this is to distribute a default  
map file that has these settings and initialize using that, then load  
the context.

Cheers

Paul

On 24-Jan-06, at 5:47 AM, Eijnden, B. van den (Bart) wrote:

> Hi list,
>
> what is the correct way to use a WMC in a Chameleon application  
> instead of a
> MAP file? I am trying to do the following:
>
> $szContextFile = "../map/testapplicatie.cml";
> $oApp->CWCInitialize( $szTemplate, "" );
> $oApp->loadContext($szContextFile);
>
> But then I run into the trouble that there is no fontset or web  
> imagepath
> set etc., so I added the following lines manually to loadContext in
> chameleon.php:
>
>
> $this->moMapSession->oMap->setFontSet(CHAMELEON_PATH."/../etc/ 
> fonts.txt");
>         $this->moMapSession->oMap->web->set( "imagepath",
> $_SESSION['gszTmpImgPath'] );
>         $this->moMapSession->oMap->web->set( "imageurl",
> $_SESSION['gszTmpWebPath'] );
>
> I am sure I am missing something though, but what ...
>
> Thanks.
>
> Best regards,
> Bart
>
>
> Disclaimer
> ********************************************************************** 
> **
> Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
> uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
> hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
> informeren. Wij adviseren u om bij twijfel over de juistheid of de
> volledigheid van de mail contact met afzender op te nemen.
>
> This message shall not constitute any rights or obligations.
> This message is intended solely for the addressee.
> If you have received this message in error, please delete it and
> notify the sender immediately. When in doubt whether this message
> is correct or complete, please contact the sender.
> ********************************************************************** 
> **
>
> _______________________________________________
> 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/|
+-----------------------------------------------------------------+






More information about the Chameleon mailing list