[Chameleon] Re: legendtemplate problem: numlayers - solved

bartvde at xs4all.nl bartvde at xs4all.nl
Mon Aug 16 10:14:41 EDT 2004


Hi list,

the problem has been solved and was Chameleon related, not Mapscript related.

The CatalogSearch widget has the following statement:

$this->addLayer( $this->moMapObject->oMap, $szWMSName, $nWMSType,
$axParams, $_SESSION['gErrorManager'] );

if this is changed into (mind the &):

$this->addLayer( & $this->moMapObject->oMap, $szWMSName, $nWMSType,
$axParams, $_SESSION['gErrorManager'] );

the legendtemplate has the correct number of layers in the numlayers
property.

Best regards,
Bart

> Hi list,
>
> I have the following problem which I cannot seem to tackle:
>
> I have a widget which adds a layer to a map, it is a modification of the
> catalog widget.
>
> The legendtemplate itself shows the added layer correctly, but the
> numlayers of the map object still has the old value (it lags behind one
> submit all the time) and because of this the LegendTemplateGetLayerName
> array is not complete and cannot be used correctly with javascript.
>
> Any ideas what could be causing this problem?
>
> Thanks in advance.
>
> Best regards,
> Bart
>
>
>



More information about the Chameleon mailing list