[Chameleon] Change layer status
Alexys Herleym Rodriguez Avellaneda
alexys_6 at yahoo.es
Mon Mar 3 14:29:17 EST 2008
Hi Julien,
Thanks for your help.
This was the only way to show the Municipios's layers. This is the way that legend template work.
if ($this->isVarSet("legendlayername"))
{
$aLegendLayers = $this->getVar("legendlayername");
#echo "legendlayername = ".implode("-", $this->getVar("legendlayername")) ."<br>";
if (!in_array("Municipios", $aLegendLayers)) #Si no esta en el array coloquelo
array_push($aLegendLayers, "Municipios");
$this->setVar("legendlayername", $aLegendLayers);
}
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)
My widget has $this->mnPriority = PRIORITY_HIGH;, it means that it process first. But doen't work. The only solution was the above code.
Thanks for your help.
Alexys H
----- Mensaje original ----
De: Julien-Samuel Lacroix <jlacroix at mapgears.com>
Para: Alexys Herleym Rodriguez Avellaneda <alexys_6 at yahoo.es>
CC: chameleon <chameleon at lists.maptools.org>
Enviado: lunes, 18 de febrero, 2008 18:11:01
Asunto: Re: [Chameleon] Change layer status
Hi,
The widget that use those checkbox to define the layers' status is the
LegendTemplate widget. The problem is probably that your custom widget
is processed before the legend template. To make it happen after you can
set its priority below the LegendTemplate priority(PRIORITY_MEDIUM). So
set it like that in the Constructor:
$this->mnPriority = PRIORITY_LOW;
Does it help?
Julien
______________________________________________
¿Con Mascota por primera vez? Sé un mejor Amigo. Entra en Yahoo! Respuestas http://es.answers.yahoo.com/info/welcome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20080303/2b00c554/attachment.html
More information about the Chameleon
mailing list