Thank you so much Matt. Your instructions to me were very patient and concise. Everything is working as you said it would and I can delete my old sloppy code! You were really a great help to me and I am very grateful :)<br>
<br>Sincerely,<br><br>elshae<br><br><div class="gmail_quote">On Thu, Oct 28, 2010 at 11:45 AM, Matt Priour <span dir="ltr"><<a href="mailto:mpriour@kestrelcomputer.com">mpriour@kestrelcomputer.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="padding-right: 10px; padding-left: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Arial" size="2">You have to "Apply" the patch. The exact
instructions are SVN client dependant. If you are using SVN command-line then
the OL wiki has good instructions. [1]</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">If you are using something like TortiseSVN, then
you would right click on the GeoExt root directory in the file explorer.
</font></div>
<div><font face="Arial" size="2">Select TortiseSVN -> Apply Patch</font></div>
<div><font face="Arial" size="2">Then select the patch file and hit
apply</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">[1] <a href="http://trac.osgeo.org/openlayers/wiki/ApplyingPatches" target="_blank"><font face="Times New Roman" size="3">http://trac.osgeo.org/openlayers/wiki/ApplyingPatches</font></a></font></div>
<div class="im">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Matt Priour</font></div>
<div><font face="Arial" size="2">Kestrel Computer Consulting</font></div>
</div><div style="font: 10pt Tahoma;">
<div><br></div>
<div style="background: none repeat scroll 0% 0% rgb(245, 245, 245);">
<div><b>From:</b> <a title="itintern12@gmail.com" href="mailto:itintern12@gmail.com" target="_blank">IT Intern</a> </div>
<div><b>Sent:</b> Thursday, October 28, 2010 10:17 AM</div>
<div><b>To:</b> <a title="users@geoext.org" href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> </div>
<div><b>Subject:</b> Re: [Users] Disable Nodes on Zoom Event</div></div></div><div><div></div><div class="h5">
<div><br></div>My apologies, just realized it is a patch file not a .js, but I
still need to know where exactly it goes...<br><br>
<div class="gmail_quote">On Thu, Oct 28, 2010 at 11:15 AM, IT Intern <span dir="ltr"><<a href="mailto:itintern12@gmail.com" target="_blank">itintern12@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);">That's
quite awesome! Thanks Matt. So now where do I apply this patch
:p<br><br>Do I just copy the file into <br>
<h2>lib/GeoExt/widgets/tree</h2>and override the old LayerNode.js no
worries???<br><br>cheers,<br><br>elshae
<div>
<div></div>
<div><br><br><br>
<div class="gmail_quote">On Thu, Oct 28, 2010 at 10:46 AM, Matt Priour <span dir="ltr"><<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);">
<div style="padding-right: 10px; padding-left: 10px; padding-top: 15px;" name="Compose message area">
<div><font face="Arial" size="2">OpenLayers already has a Map moveend event
handler that will check to see if the layer is still in range (maxExtent,
minResolution, maxResolution, minScale & maxScale are all
tested)</font></div>
<div><font face="Arial" size="2">You should use one of these configuration
options (maxResolution, minResolution are easiest) on the layers and let OL
do the turning on/off layers for you.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">To have your GeoExt LayerNodes respond by
enabling/disabling when layers are in/out of range, you can apply the
autoDisable patch [1] attached to Ticket #235 (<a href="http://trac.geoext.org/attachment/ticket/235" target="_blank">http://trac.geoext.org/attachment/ticket/235</a>)</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">[1] <a href="http://trac.geoext.org/attachment/ticket/235/autoDisableLayerNode.patch" target="_blank">http://trac.geoext.org/attachment/ticket/235/autoDisableLayerNode.patch</a></font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Matt Priour</font></div>
<div><font face="Arial" size="2">Kestrel Computer Consulting</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2"></font> </div>
<div style="font: 10pt Tahoma;">
<div><br></div>
<div style="background: none repeat scroll 0% 0% rgb(245, 245, 245);">
<div><b>From:</b> <a title="itintern12@gmail.com" href="mailto:itintern12@gmail.com" target="_blank">IT Intern</a> </div>
<div><b>Sent:</b> Thursday, October 28, 2010 9:08 AM</div>
<div><b>To:</b> <a title="users@geoext.org" href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> </div>
<div><b>Subject:</b> [Users] Disable Nodes on Zoom Event</div></div></div>
<div>
<div></div>
<div>
<div><br></div>Hello GeoExt Users,<br><br>I have a zoom event that when a
user zoom in and out of my map certain layers I setVisibility(false).
Now what I would like to do is have another event inside that event which
disables the nodes of those layers when their setVisibilty(false) and
enables them back when setVisibility(true). I have some code and it
kinda works, but the problem is the checkchange event does not only work
when the zoomend event is done, but also anytime a user clicks the layer
nodes. I played a little with stopPropagation and that didn't do
anything for me. Actually I think my zoomend event could be much
better coded and I would really love some suggestions. I appreciate
everyone taking their time to help me
:)<br><br>elshae<br><br>Code:<br><br>map.events.on({ "zoomend": function (e)
{<br><br>
layerTree.on("checkchange", function (node, checked)
{<br>
alert(node.text + "Inside
event");<br>
if(checked ==
false)<br>
node.disable();<br>
else if(checked ==
true)<br>
node.enable();<br><br>
});<br>
<br>
if (this.getZoom()
> 7) {<br>
tib_villages.setVisibility(true);<br>
tib_lakes.setVisibility(true);<br>
tib_townships.setVisibility(true);<br><br>
<br>
}<br>
else {<br><br>
tib_villages.setVisibility(false);<br>
tib_lakes.setVisibility(false);<br>
tib_townships.setVisibility(false);<br>
//alert(layerTree.tib_villages.node.text);<br>
<br>
if (this.getZoom() > 5)
{<br>
infrastructure.setVisibility(true);<br>
geography.setVisibility(true);<br>
geography2.setVisibility(true);<br>
tib_countys.setVisibility(true);<br>
<br>
}<br>
else{<br>
infrastructure.setVisibility(false);<br>
geography.setVisibility(false);<br>
geography2.setVisibility(false);<br>
tib_countys.setVisibility(false);<br>
}<br>
}//end
else<br>
<br>
}//end function
(e)<br>
<br>
}); //end
map.events.on<br></div></div>
<p></p>
<hr>
<p></p>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote></div><br></div></div></blockquote></div><br>
<p>
</p><hr>
<p></p>_______________________________________________<br>Users mailing
list<br><a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></div>
</blockquote></div><br>