MapTools.org

[Chameleon] Questions about Chameleon-1.1a

Jason Fournier jfournier@dmsolutions.ca
Mon, 29 Mar 2004 12:40:03 -0500
Wei,

It's possible, through the index.phtml page, to load a context into the 
existing mapfile.  The mapfile is a necessary component to the operation 
of the application.  That being said, the Mapfile can be vanilla (ie, 
contain no layers).  Here is a sample index.phtml you could use:

<?

include( "/path/to/chameleon.php" );

$szTemplate = "test.html";
$szMapFile = "/path/to/test.map";
$szContext = "/path/to/test.cml";

class FOO extends Chameleon
{
  function FOO()
  {
    parent::Chameleon();
    $this->moMapSession = new MapSession_RW;
    $this->moMapSession->setTempDir( getSessionSavePath());
  }
}

$oApp =  new FOO();
$oApp->CWCInitialize( $szTemplate, $szMapFile  );

if (!isset($_GET['NAV_CMD']) && !isset($_POST['NAV_CMD']))
{
    $oApp->moMapSession->oMap->loadMapContext( $GLOBALS['szContext'] );
}

$oApp->CWCExecute();

?>

This code is a temporary solution to a feature that will be supported in 
a future version of Chameleon.

Kind Regards,
Jason





we wei wrote:

>Hi all,
>
>Does anyone know how can I use a context file to start
>up Chameleon application in Chameleon 1.1a instead of
>a mapfile?  Also, is it possible to have the manage
>servers functionality in the Layer manager of
>Chameleon 1.0.5 in Chameleon-1.1a ?  If it is
>possible, which widget should I use?
>
>Thanks in advance,
>
>Wei    
> 
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Finance Tax Center - File online. File on time.
>http://taxes.yahoo.com/filing.html
>_______________________________________________
>Chameleon mailing list
>Chameleon@lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/chameleon
>
>  
>

-- 
___________________________
Jason Fournier
DM Solutions Group
Application Developer
Ottawa, ON
613.565.5056 x 18
jfournier@dmsolutions.ca





This archive was generated by Pipermail.