[Chameleon] Layer Status Problem

D'cruz,Steven [Ontario] Steven.D'Cruz at ec.gc.ca
Tue Aug 24 11:18:41 EDT 2004


Hi there,

	I'm currently attempting to create a really simple function as
part of a widget with the following javascript code:
<script language="javascript">
<!--
	function enableLayer(i)
	{
		goCWCJSAPI.oMap.GetLayer(i).SetStatus("ON");
		goCWCJSAPI.oMap.Refresh();
	}
//-->
</script>

For any given layer x, the function is called as enableLayer(x), where
0<x<max number of layers.  The problem I'm running into is that this
code does not work correctly in the CWC2 application I'm using
(Chameleon v1.0.5).  Instead of enabling the layer and then refreshing
the map, I get the 'loading ... please wait' message, which lasts
forever.  I've checked for javascript errors and I get a message to the
extent of 'document.body is empty'.  Any suggestions would be greatly
appreciated.  

Steven D'Cruz
(Open)GIS Developer
Environment Canada
Steven.D'Cruz at ec.gc.ca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20040824/b4e6ffca/attachment.htm


More information about the Chameleon mailing list