<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Hi Julien,<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>Thanks for your help.<br><br>This was the only way to show the Municipios's layers. This is the way that legend template work.<br><br> if ($this->isVarSet("legendlayername"))<br> {<br>
$aLegendLayers = $this->getVar("legendlayername");<br> #echo "legendlayername = ".implode("-",
$this->getVar("legendlayername")) ."<br>";<br> if (!in_array("Municipios", $aLegendLayers)) #Si no esta en el array coloquelo<br> array_push($aLegendLayers, "Municipios"); <br> $this->setVar("legendlayername", $aLegendLayers);<br> }<br><div> By other side, the legend template doesn't have mnPriority, and i try to put it, and doesn't work (it does't show the legend)<br><br>My widget has $this->mnPriority
= PRIORITY_HIGH;, it means that it process first. But doen't work. The only solution was the above code.<br><br>Thanks for your help.<br><br>Alexys H<br><br></div><span style="font-weight: bold;"></span><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Mensaje original ----<br>De: Julien-Samuel Lacroix <jlacroix@mapgears.com><br>Para: Alexys Herleym Rodriguez Avellaneda <alexys_6@yahoo.es><br>CC: chameleon <chameleon@lists.maptools.org><br>Enviado: lunes, 18 de febrero, 2008 18:11:01<br>Asunto: Re: [Chameleon] Change layer status<br><br>Hi,<br><br>The
widget
that
use
those
checkbox
to
define
the
layers'
status
is
the <br>LegendTemplate
widget.
The
problem
is
probably
that
your
custom
widget <br>is
processed
before
the
legend
template.
To
make
it
happen
after
you
can <br>set
its
priority
below
the
LegendTemplate
priority(PRIORITY_MEDIUM).
So <br>set
it
like
that
in
the
Constructor:<br><br>$this->mnPriority
=
PRIORITY_LOW;<br><br>Does
it
help?<br>Julien<br></div></div></div></div><br></div></div><br>
<hr size=1><br><font face="Verdana" size="-2">¿Con Mascota por primera vez? - Sé un mejor Amigo<br><a href="http://es.rd.yahoo.com/evt:51361/*http://es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=XXXXXXXX">Entra en Yahoo! Respuestas</a>.<br></font> </body></html>