[Chameleon] Accessing Map Resources with PHP/MapScript in Chameleon

Shon Doseck shon at pangaeatech.com
Thu Jul 1 11:35:47 EDT 2004


List,
 
I'm pretty new to Chameleon and am not sure where the best place is to apply
PHP/MapScript logic within the Chameleon framework.  Armed with the
information gained from the MapServer User's Meeting last month, I was able
to get my interface up and styled with relative ease.  Now I have to change
the data content (i.e. name and data source of a layer) based on user
interaction with a pull-down form field.  I'm pretty comfortable with how to
do this in PHP/MapScript (see my basic approach below), but not knowing much
about how map session and state information is maintained with Chameleon,
I'm not sure where I should go with this.
 

$nLayers=$oApp->moMapSession->oMap->numlayers;
 
for($i=0; $i<$nLayers; $i++)
{
    $oLayer=$oApp->moMapSession->oMap->getlayer($i);
    if ($oLayer->name == 'Original_Layer_Name') {
        $oLayer->set("name","User_Defined_Layer_Name");
        $oLayer->set("data","/data1/rest_of_path_to_data");
    }
}
 

If there doesn't already exist a widget to help me perform this task,
perhaps a custom widget is the answer, but again without more knowledge of
the anatomy of widgets and how to develop them, I wouldn't know where to
start.  A push in the right direction would be very much appreciated.  I'm
excited to get past the initial learning curve for utilizing all the
potential of Chameleon and hope this exercise will bring me closer.
 
Thanks,
Shon 
________________________________________
Shon M. Doseck
GIS Analyst
Pangaea Information Technologies, Ltd.
Tel. 312.986.9471
Cell. 312.804.9650
Fax. 312.986.9477
http://www.pangaeatech.com <http://www.pangaeatech.com/> 
________________________________________ 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20040701/d5ebac7f/attachment.htm


More information about the Chameleon mailing list