Hi Matt, Nah, it's no "race" but I definitively need that feature soon, so I rather share how I would have done it.
Ideally, I would have made a new "rangechange" event for the OpenLayers.Layer object and listen to that event to disable/enable the UI of the node accordingly. Upon creation, a node would be disabled if the 'inRange' is set to 'false' (unless it's a base layer). That's pretty much it. Does that make sense ? How about your method ? Alexandre On 10-10-21 10:29 AM, Matt Priour wrote: > "It's a race" ;) > I am working on implementing that feature today as well. > > Matt Priour > Kestrel Computer Consutling > > > -------------------------------------------------- > From: "Alexandre Dube" <[email protected]> > Sent: Thursday, October 21, 2010 8:55 AM > To: "Andreas Hocevar" <[email protected]> > Cc: "GeoEXT Users" <[email protected]> > Subject: Re: [Users] Tree node disabling with min/max scale > >> Got it. I guess it shouldn't be that hard to implement, so I'll give it >> a try and report back with a patch + ticket if it goes well. >> >> Thanks, >> >> Alexandre >> >> >> On 10-10-21 09:39 AM, Andreas Hocevar wrote: >>> Hi, >>> >>> this would be a useful improvement, but it is not yet implemented - >>> patches welcome! >>> >>> Regards, >>> Andreas. >>> >>> On Oct 21, 2010, at 15:30 , Alexandre Dube wrote: >>> >>> >>>> Hi, >>>> >>>> The LayerSwitcher automatically disables its layer elements when >>>> zooming in/out following the min/max scale values of each layer. Is >>>> that feature available with GeoExt tree nodes as well or do I need >>>> to do >>>> that manually ? >>>> >>>> Thanks, >>>> >>>> -- >>>> Alexandre Dubé >>>> Mapgears >>>> www.mapgears.com >>>> >>>> _______________________________________________ >>>> Users mailing list >>>> [email protected] >>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users >>>> >>> >>> >>> >> >> >> -- >> Alexandre Dubé >> Mapgears >> www.mapgears.com >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://www.geoext.org/cgi-bin/mailman/listinfo/users >> -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
