[Users] Transparencyslider on rightclick
Dan Ramage
dan at inlet.geol.sc.edu
Fri Oct 22 16:21:02 CEST 2010
Here: http://rcoos.org/carolinasrcoosrev2/secoora_interactive_tst.html is my
testing site.
The main javascript is here:
http://rcoos.org/carolinasrcoosrev2/lib/secoora_interactive_tst.js, but most
of the code dealing with the tree is here:
http://rcoos.org/carolinasrcoosrev2/lib/olMap1.0.js
The slider is here:
http://rcoos.org/carolinasrcoosrev2/lib/GeoExt-1.0/lib/GeoExt/widgets/tree/L
ayerOpacitySliderPlugin.js
The mixin to make it work is here:
http://rcoos.org/carolinasrcoosrev2/lib/GeoExt-1.0/lib/GeoExt/widgets/tree/T
reeNodeUIEventMixinExtended.js
For my mixin, I basically just copied the base one, I couldn't seem to get
the Ext.extend() working and didn't want to spend a lot of time on that just
yet.
When I create my layers I have a couple of hash tags I add in the options
parameter to specify whether I want the slider or not.
In the olMap1.0.js, at the very top is my GeoExt.tree.layerLoaderExtended
where I make sure only the tree nodes that have the option set to have a
slider get them. If I didn't do this, every layer in that layercontainer
node would have a slider.
In the LayerOpacitySliderPlugin.js, the onRenderNode is where most of the
work gets done. I used the RadioButtonPlugin.js as a guide on how to go
about doing this. I used the Ext.Slider() widget.
This was a big learning experience for me, I am still not anywhere as
knowledgeable about javascript as I would like.
Dan
_____
From: Viggo Lunde [mailto:viggo.lunde at gmail.com]
Sent: Friday, October 22, 2010 8:21 AM
To: Dan Ramage
Subject: Re: [Users] Transparencyslider on rightclick
Sure, do you have example-code or a description
Viggo
2010/10/22 Dan Ramage <dan at inlet.geol.sc.edu>
I implement a slider in the layer tree. Not sure if that is helpful or not.
Dan
_____
From: users-bounces at geoext.org [mailto:users-bounces at geoext.org] On Behalf
Of Viggo Lunde
Sent: Friday, October 22, 2010 2:38 AM
To: users at geoext.org
Subject: [Users] Transparencyslider on rightclick
Hi
Nice, then we have the min/max scale.
Is there anyone who implemented the transparencyslider on rightclick as
vell?
Looking forward to get rid of MapFish in the client.
Viggo Lunde
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101022/075c4b46/attachment-0001.htm
More information about the Users
mailing list