<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Dan,<br>
<br>
I'm using the GeoMoose API (v2.4 I think) in a JavaScript user
extension to turn on a multi-mapsource Layer:<br>
<br>
GeoMOOSE.turnLayerOn("Image/image:Filler/all");<br>
<br>
In geomoose.js, turnLayerOn calls changeLayerVisibility, where the
layerpath is split and the DOM is queried for each portion. But
those portions are Map-Sources, not Layers, and therefor are not
found.<br>
<br>
So I changed the code to simply query on the original path (not the
portions), and it seems to work:<br>
<br>
<br>
<tt> changeLayerVisibility : function(layerPath, visibility) {
<br>
<font color="#666666">/* <br>
var paths = this.splitPaths(layerPath);<br>
for(var p = 0; p < paths.length; p++) {<br>
var e =
document.getElementById('catalog-'+paths[p]);<br>
if(!e &&
!Catalog.setLayerVisibility(paths[p], visibility)) {<br>
OpenLayers.Console.log('Layer '+paths[p]+' does
not exist');<br>
} else if(e && e.checked != visibility) {<br>
e.checked = visibility;<br>
e.onclick();<br>
}<br>
}<br>
*</font>/ <br>
var e = document.getElementById('catalog-'+layerPath);<br>
if(!e && !Catalog.setLayerVisibility(layerPath,
visibility)) {<br>
OpenLayers.Console.log('Layer '+layerPath+' does not
exist');<br>
} else if(e && e.checked != visibility) {<br>
e.checked = visibility;<br>
e.onclick();<br>
}<br>
},</tt><br>
<br>
If you think the above fix is valid, I'll file an Issue in Trac (I
guess we're still filing issues on v2.4), and put the fix in SVN.<br>
<br>
Thanks!<br>
<pre class="moz-signature" cols="72">--
Best Regards,
Brent Fraser</pre>
</body>
</html>