Old State/New State - mapscript/chameleon

Steve W klawsteve at YAHOO.COM
Tue Feb 28 15:32:33 EST 2006


Apologies in advance if this is a previously answered question, I am trying
to make my way through the documents and list archives but haven't hit on a
solution.

I am trying work on an page display using a combination of PHP mapscript and
chameleon.  I am working with modifications of the source chameleon
index.phtml and template.html pages.  I would like to display some map state
variables on my page. (example - mapextent values).

Dropping a chameleon extent widget onto the template works fine.  I can also
modify the chameleon index.phtml to get for me the extent->minx et al
variables and pass them to the template using the setVar ('MINX',$my_minx)
type syntax and then referencing them in the template using [$MINX$].  So I
think I have an idea of the syntax I should be working with.

My problem then, is that these values when displayed on the resultant web
page they are displaying the previous state of the map extent, not the
current one.  So I know that my problem roots from my failure to understand
when/how/where the map state variables are changed, and how to access
current values.

Any insights shall be appreciated.
Much thanks,
-steve

$oApp =  new SampleApp();
$oApp->registerSkin( 'skins/sample' );
$oApp->CWCInitialize( $szTemplate, $szMapFile  );
// get the extent variables and round them to two digits.
$my_minx = round($oApp->moMapSession->oMap->extent->minx,2);
$oApp->setVar ('XMIN',$my_minx);
$oApp->CWCExecute();



More information about the mapserver-users mailing list