[Chameleon] Change layer status

Julien-Samuel Lacroix jlacroix at mapgears.com
Thu Feb 14 16:21:45 EST 2008


Hi,

Where do you put that code?

If you change a layer of the MapObject it should display correctly. Did 
you checked in your session mapfile?

Julien

Alexys Herleym Rodriguez Avellaneda wrote:
> Hi Friends,
>  
> I have the next case.
>  
> I use this code for a current layer in the map:
>  
> $oMap = $this->moMapObject->oMap;
> $oLayer = $oMap->getLayerByName("Municipios");
> if ($oLayer->status == MS_OFF || $oLayer->status == MS_DEFAULT)
>            {$oLayer->set("status", MS_ON);}
>  
> But the layer Municipios still is off (th layer doen't show).
>  
> By other side i do a copy of the layer Municipios y that work fine, i 
> mean the new layer apper and is on:
>  
> $oHighlight = ms_newLayerObj($oMap, $oLayer);
> $oHighlight->set("name", $oLayer->"Municipios_copy");
> $oHighlight->set("status", MS_ON);
>  
> I need to send another command to refresh in the case the layer already 
> exist?
>  
>  
> Thanks
>  
> Alexys H
>  
> 
> ------------------------------------------------------------------------
> 
> ¿Con Mascota por primera vez? - Sé un mejor Amigo
> Entra en Yahoo! Respuestas 
> <http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=XXXXXXXX>.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list