<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Dan,<br>
    <br>
    &nbsp; I'm using the GeoMoose API (v2.4 I think) in a JavaScript user
    extension to&nbsp; turn on a multi-mapsource Layer:<br>
    <br>
    &nbsp;&nbsp;&nbsp; &nbsp; 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.&nbsp; 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>&nbsp;&nbsp;&nbsp; changeLayerVisibility : function(layerPath, visibility) {&nbsp;&nbsp;&nbsp;
      &nbsp;<br>
      <font color="#666666">/*&nbsp;&nbsp;&nbsp; <br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var paths = this.splitPaths(layerPath);<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for(var p = 0; p &lt; paths.length; p++) {<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var e =
        document.getElementById('catalog-'+paths[p]);<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!e &amp;&amp;
        !Catalog.setLayerVisibility(paths[p], visibility)) {<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OpenLayers.Console.log('Layer '+paths[p]+' does
        not exist');<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if(e &amp;&amp; e.checked != visibility) {<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.checked = visibility;<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.onclick();<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
        *</font>/&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; var e = document.getElementById('catalog-'+layerPath);<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(!e &amp;&amp; !Catalog.setLayerVisibility(layerPath,
      visibility)) {<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; OpenLayers.Console.log('Layer '+layerPath+' does not
      exist');<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else if(e &amp;&amp; e.checked != visibility) {<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.checked = visibility;<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; e.onclick();<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
      &nbsp;&nbsp;&nbsp; },</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>