<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 <klassen.js@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> Brent Fraser <bfraser@geoanalytic.com> <br><b><span style="font-weight: bold;">Cc:</span></b> Dan Little <dan.little@excensus.com>; GeoMOOSE Users List <geomoose-users@lists.osgeo.org> <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. 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). I think it is all sitting pending testing. 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>
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="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>