[Chameleon] Changing class expression

Paul Spencer pspencer at dmsolutions.ca
Mon Sep 19 08:20:29 EDT 2005


Francesco,

this should work as long as you use oMapSession to save the state of  
the map file after you have changed it in the iframe.  For instance,

$_SESSION['gszCurrentState'] = $oMapSession->saveState();

Cheers

Paul

On 18-Sep-05, at 1:48 PM, Francesco Palermo wrote:

> Hello list,
>
> i would like to modify the class expression of some layers of my  
> map but i
> don't know how i can get this control on the layer.
> i understood that the map is accessible trough the oMapsession  
> object and
> further by the embedded objects.
> so, is there any way to change the class expression and to reload  
> the map?
>
> my code that is in an iframe is:
> ---
> [...]
> // Setting the class expression
>     $baseLayer = $oMapSession->oMap->getLayer(0);
>     $baseLayer -> set ("status",MS_OFF);
>     $class = $baseLayer->getClass(0);
>     $class -> setexpression('374');
> [...]
>
> // reloading the map through a button
> <input type="button" value="Invia"
> onclick="parent.window.document.forms[0].submit()";
> ---
>
> i'm sorry but i'm a newbie ;))
>
> thank you
>
>
> -- 
> Francesco Palermo
> _______________________________________________
> 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