[Chameleon] is there a default parseURL function?

Paul Spencer pspencer at dmsolutions.ca
Wed Mar 2 14:41:18 EST 2005


Ken,

if you are using Chameleon 2.0 then there are several functions that you 
can override in your derived Chameleon class inside your application.

For instance, if you have

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


you can add a pre-ParseURL step by adding to this class as follows:

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

   function CWCProcessURL($oFormVars)
   {
     //do your custom stuff, you can access the map as
     //$this->moMapObject->oMap

     //this must be here or nothing will work.
     parent::CWCProcessURL($oFormVars);
   }
}

Cheers

Paul

Ken Sanderson wrote:
> I have some PHPmapscript I want to run constantly, basically its a 
> database query I build into a layer I want added to the map object.
> 
> Where is the best place to put this scripting and is there a way to hook 
> it in so that it only displays for one chameleon project rather than all?
> 
> My plan of attack so far is to just create a widget that does it and 
> load the widget, but was hoping I could just insert the code somewhere.
> 
> Thanks,
> 
> Ken
> 
> _______________________________________________
> 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