[Chameleon] LayerManager widget doesnt always work

Doug H dougholm at gmail.com
Thu Jul 13 18:39:11 EDT 2006


Hi
I have added a LayerManager widget to my map, which displays the popup
layer manager window, and sometimes it adds or subtracts the layers
from my map and sometimes it just stops working and I get an error
that reads:

Line: 26
Char: 5
Error: Invalid Syntax
Code: 0
URL: http://mapgis/chameleon/widgets/LayerManager/LayerManager.php?sid=44b6c8054bc8a

if I 'view source' and look at line 26 I see this:
document.forms[0].submit();
which is located within this function here:

function clickLayerManagerAction(obj, szAction)
{
    document.forms[0]['LAYERMANAGER_ACTION'].value = szAction;
    document.forms[0].submit();

    return;
}

I found this functions origin in LayerManagerAction.widget.php and it
looks like this:

function {$szJsFunctionName}(obj, szAction)
{
    {$this->mszHTMLForm}['LAYERMANAGER_ACTION'].value = szAction;
    {$this->mszHTMLForm}.submit();

    return;
}

and finally.. my widget looks like this:

	 <CWC2 TYPE="layermanager"
	              VISIBLE="TRUE"
	   	      ENABLED="TRUE"
	   	      POPUPWIDTH="475"
	   	      POPUPHEIGHT="700"
	   	      label="Layer Manager"
	   	      STYLERESOURCE="TextButtons"
	   	      TOOLBAR="TRUE"
	   	      MENUBAR="TRUE"
	   	      STATUS="TRUE" >

	   	       <IMAGE STATE="normal"/>
	   	       <IMAGE STATE="hover"/>
	   	       <IMAGE STATE="selected"/>

	    </CWC2>

Like I said before, sometimes it works and sometimes it doesnt. It
never really seems to add annotations but I know it has done it at
least once. Does anyone have any suggestions as to what the problem
might be?
Thanks in advance,
Doug


More information about the Chameleon mailing list