<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Jim's right, we should be able to integrate this patch.<br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Jim Klassen &lt;klassen.js@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Brent Fraser &lt;bfraser@geoanalytic.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> Dan Little &lt;dan.little@excensus.com&gt;; GeoMOOSE Users List &lt;geomoose-users@lists.osgeo.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, April
 16, 2012 2:46 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Geomoose-users] GeoMoose API: GeoMOOSE.turnLayerOn problem with multi map-source layers<br> </font> </div> <br>
<div id="yiv1161486431"><div>I don't think we've made the 2.4.1 release yet either. &nbsp;I have already applied some fixes in branches/geomoose-2.4 in anticipation for the 2.4.1 release (update for Mapserver 6.x and the famous extra comma). &nbsp;I think it is all sitting pending testing. &nbsp;My main confusion is that the 2.4.0 tarball and the 2.4.0 tag and branch in SVN somehow ended up at slightly different versions and I'm not sure which is most correct.<div><br><div><div>On Apr 16, 2012, at 2:08 PM, Brent Fraser wrote:</div><br class="yiv1161486431Apple-interchange-newline"><blockquote type="cite">
  

    
  
  <div>
    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="yiv1161486431moz-signature">-- 
Best Regards,
Brent Fraser</pre>
  </div>

_______________________________________________<br>Geomoose-users mailing list<br><a rel="nofollow" ymailto="mailto:Geomoose-users@lists.osgeo.org" target="_blank" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/geomoose-users<br></blockquote></div><br></div></div></div><br>_______________________________________________<br>Geomoose-users mailing list<br><a ymailto="mailto:Geomoose-users@lists.osgeo.org" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/geomoose-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a><br><br><br> </div> </div> </blockquote></div>   </div></body></html>