<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6002.18309" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" 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"><FONT
face="Times New Roman"
size=3>http://trac.osgeo.org/openlayers/wiki/ApplyingPatches</FONT></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 style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=itintern12@gmail.com
href="mailto:itintern12@gmail.com">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">users@geoext.org</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] Disable Nodes on Zoom Event</DIV></DIV></DIV>
<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">itintern12@gmail.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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 class=h5><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: rgb(204,204,204) 1px solid">
<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: 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>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>