Bienvenue sur PostGIS.fr

Bienvenue sur PostGIS.fr , le site de la communauté des utilisateurs francophones de PostGIS.

PostGIS ajoute le support d'objets géographique à la base de données PostgreSQL. En effet, PostGIS "spatialise" le serverur PostgreSQL, ce qui permet de l'utiliser comme une base de données SIG.

Maintenu à jour, en fonction de nos disponibilités et des diverses sorties des outils que nous testons, nous vous proposons l'ensemble de nos travaux publiés en langue française.

source: trunk/workshop-routing-foss4g/web/GeoExt/docs/lib/GeoExt/widgets/LayerOpacitySlider.html @ 76

Revision 76, 15.2 KB checked in by djay, 10 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml">
5  <head>
6    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7   
8    <title>GeoExt.LayerOpacitySlider &mdash; GeoExt v1.0</title>
9    <link rel="stylesheet" href="../../../_static/geoext.css" type="text/css" />
10    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
11    <script type="text/javascript">
12      var DOCUMENTATION_OPTIONS = {
13        URL_ROOT:    '../../../',
14        VERSION:     '1.0',
15        COLLAPSE_MODINDEX: false,
16        FILE_SUFFIX: '.html',
17        HAS_SOURCE:  true
18      };
19    </script>
20    <script type="text/javascript" src="../../../_static/jquery.js"></script>
21    <script type="text/javascript" src="../../../_static/doctools.js"></script>
22    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
23    <link rel="top" title="GeoExt v1.0" href="../../../index.html" />
24    <link rel="up" title="Widgets" href="../widgets.html" />
25    <link rel="next" title="GeoExt.LegendImage" href="LegendImage.html" />
26    <link rel="prev" title="GeoExt.LayerLegend" href="LayerLegend.html" />
27   
28   
29   
30   
31   
32
33  </head>
34  <body>
35    <div class="header">
36        <div class="wrap">
37            <h1 id="logo"><a href="../../../index.html">GeoExt</a></h1>
38            <ul id="top-nav">
39                <li class="first"><a href="../../../docs.html">Documentation</a></li>
40                <li><a href="../../../examples.html">Examples</a></li>
41                <li><a href="../../../downloads.html">Download</a></li>
42                <li><a href="http://trac.geoext.org/">Development</a></li>
43            </ul>
44            <div id="searchbox">
45                <form class="search" action="../../../search.html" method="get">
46                    <input id="searchbox-query" type="text" name="q" size="25" value="Search &hellip;" tabindex="3" onblur="if(this.value=='') this.value='Search &hellip;';" onfocus="if(this.value=='Search &hellip;') this.value='';" />
47                    <input id="searchbox-submit" type="image" value="Search" src="../../../_static/img/search_icon_green.png" />
48                    <input type="hidden" name="check_keywords" value="yes" />
49                    <input type="hidden" name="area" value="default" />
50                </form>
51            </div>
52        </div>
53    </div>
54
55    <div class="related">
56      <h3>Navigation</h3>
57      <ul>
58        <li><a href="../../../index.html">GeoExt</a> &raquo;</li>
59          <li><a href="../../index.html" >API Reference</a> &raquo;</li>
60          <li><a href="../widgets.html" accesskey="U">Widgets</a> &raquo;</li>
61        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.LayerOpacitySlider</span></tt></a></li>
62      </ul>
63    </div>
64
65      <div class="sphinxsidebar">
66        <div class="sphinxsidebarwrapper">
67            <h3><a href="../../../index.html">Table Of Contents</a></h3>
68            <ul>
69<li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.LayerOpacitySlider</span></tt></a><ul>
70<li><a class="reference external" href="#example-use">Example Use</a></li>
71<li><a class="reference external" href="#config-options">Config Options</a></li>
72<li><a class="reference external" href="#public-methods">Public Methods</a></li>
73</ul>
74</li>
75</ul>
76
77            <h4>Previous topic</h4>
78            <p class="topless"><a href="LayerLegend.html"
79                                  title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.LayerLegend</span></tt></a></p>
80            <h4>Next topic</h4>
81            <p class="topless"><a href="LegendImage.html"
82                                  title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.LegendImage</span></tt></a></p>
83        </div>
84      </div>
85
86
87    <div class="document">
88      <div class="documentwrapper">
89        <div class="bodywrapper">
90          <div class="body">
91           
92  <div class="section" id="geoext-layeropacityslider">
93<h1><a title="GeoExt.LayerOpacitySlider" class="reference internal" href="#GeoExt.LayerOpacitySlider"><tt class="xref docutils literal"><span class="pre">GeoExt.LayerOpacitySlider</span></tt></a><a class="headerlink" href="#geoext-layeropacityslider" title="Permalink to this headline">¶</a></h1>
94<dl class="meta docutils">
95<dt>Extends</dt>
96<dd><ul class="first last simple">
97<li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider">Ext.Slider</a></li>
98</ul>
99</dd>
100<dt>xtype</dt>
101<dd><tt class="docutils literal"><span class="pre">gx_opacityslider</span></tt></dd>
102</dl>
103<dl class="class">
104<dt id="GeoExt.LayerOpacitySlider">
105<em class="property">class </em><tt class="descclassname">GeoExt.</tt><tt class="descname">LayerOpacitySlider</tt><big>(</big><em>config</em><big>)</big><a class="headerlink" href="#GeoExt.LayerOpacitySlider" title="Permalink to this definition">¶</a></dt>
106<dd>Create a slider for controlling a layer&#8217;s opacity.</dd></dl>
107
108<div class="section" id="example-use">
109<h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2>
110<p>Sample code to render a slider outside the map viewport:</p>
111<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">slider</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">LayerOpacitySlider</span><span class="p">({</span>
112    <span class="nx">renderTo</span><span class="o">:</span> <span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">,</span>
113    <span class="nx">width</span><span class="o">:</span> <span class="mi">200</span><span class="p">,</span>
114    <span class="nx">layer</span><span class="o">:</span> <span class="nx">layer</span>
115<span class="p">});</span>
116</pre></div>
117</div>
118<p>Sample code to add a slider to a map panel:</p>
119<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">layer</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">OpenLayers</span><span class="p">.</span><span class="nx">Layer</span><span class="p">.</span><span class="nx">WMS</span><span class="p">(</span>
120    <span class="s2">&quot;Global Imagery&quot;</span><span class="p">,</span>
121    <span class="s2">&quot;http://maps.opengeo.org/geowebcache/service/wms&quot;</span><span class="p">,</span>
122    <span class="p">{</span><span class="nx">layers</span><span class="o">:</span> <span class="s2">&quot;bluemarble&quot;</span><span class="p">}</span>
123<span class="p">);</span>
124<span class="kd">var</span> <span class="nx">panel</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">MapPanel</span><span class="p">({</span>
125    <span class="nx">renderTo</span><span class="o">:</span> <span class="nb">document</span><span class="p">.</span><span class="nx">body</span><span class="p">,</span>
126    <span class="nx">height</span><span class="o">:</span> <span class="mi">300</span><span class="p">,</span>
127    <span class="nx">width</span><span class="o">:</span> <span class="mi">400</span><span class="p">,</span>
128    <span class="nx">map</span><span class="o">:</span> <span class="p">{</span>
129        <span class="nx">controls</span><span class="o">:</span> <span class="p">[</span><span class="k">new</span> <span class="nx">OpenLayers</span><span class="p">.</span><span class="nx">Control</span><span class="p">.</span><span class="nx">Navigation</span><span class="p">()]</span>
130    <span class="p">},</span>
131    <span class="nx">layers</span><span class="o">:</span> <span class="p">[</span><span class="nx">layer</span><span class="p">],</span>
132    <span class="nx">extent</span><span class="o">:</span> <span class="p">[</span><span class="o">-</span><span class="mi">5</span><span class="p">,</span> <span class="mi">35</span><span class="p">,</span> <span class="mi">15</span><span class="p">,</span> <span class="mi">55</span><span class="p">],</span>
133    <span class="nx">items</span><span class="o">:</span> <span class="p">[{</span>
134        <span class="nx">xtype</span><span class="o">:</span> <span class="s2">&quot;gx_opacityslider&quot;</span><span class="p">,</span>
135        <span class="nx">layer</span><span class="o">:</span> <span class="nx">layer</span><span class="p">,</span>
136        <span class="nx">aggressive</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
137        <span class="nx">vertical</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
138        <span class="nx">height</span><span class="o">:</span> <span class="mi">100</span><span class="p">,</span>
139        <span class="nx">x</span><span class="o">:</span> <span class="mi">10</span><span class="p">,</span>
140        <span class="nx">y</span><span class="o">:</span> <span class="mi">20</span>
141    <span class="p">}]</span>
142<span class="p">});</span>
143</pre></div>
144</div>
145</div>
146<div class="section" id="config-options">
147<h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2>
148<p>Configuration properties in addition to
149those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider">Ext.Slider</a>.</p>
150<dl class="describe">
151<dt>
152<tt class="descname">aggressive</tt></dt>
153<dd><tt class="docutils literal"><span class="pre">Boolean</span></tt>
154If set to true, the opacity is changed as soon as the thumb is moved.
155Otherwise when the thumb is released (default).</dd></dl>
156
157<dl class="describe">
158<dt>
159<tt class="descname">changeVisibility</tt></dt>
160<dd><tt class="docutils literal"><span class="pre">Boolean</span></tt>
161If set to true, the layer&#8217;s visibility is handled by the
162slider, the slider makes the layer invisible when its
163value is changed to the min value, and makes the layer
164visible again when its value goes from the min value
165to some other value. The layer passed to the constructor
166must be visible, as its visibility is fully handled by
167the slider. Defaults to false.</dd></dl>
168
169<dl class="describe">
170<dt>
171<tt class="descname">changeVisibilityDelay</tt></dt>
172<dd><tt class="docutils literal"><span class="pre">Number</span></tt> Time in milliseconds before changing the layer&#8217;s visibility.
173If the value changes again within that time, the layer&#8217;s visibility
174change does not occur. Only applicable if changeVisibility is true.
175Defaults to 5.</dd></dl>
176
177<dl class="describe">
178<dt>
179<tt class="descname">complementaryLayer</tt></dt>
180<dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> or <a title="GeoExt.data.LayerRecord" class="reference external" href="../data/LayerRecord.html#GeoExt.data.LayerRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerRecord</span></tt></a>
181If provided, a layer that will be made invisible (its visibility is
182set to false) when the slider value is set to its max value. If this
183slider is used to fade visibility between to layers, setting
184<tt class="docutils literal"><span class="pre">complementaryLayer</span></tt> and <tt class="docutils literal"><span class="pre">changeVisibility</span></tt> will make sure that
185only visible tiles are loaded when the slider is set to its min or max
186value. (optional)</dd></dl>
187
188<dl class="describe">
189<dt>
190<tt class="descname">delay</tt></dt>
191<dd><tt class="docutils literal"><span class="pre">Number</span></tt> Time in milliseconds before setting the opacity value to the
192layer. If the value change again within that time, the original value
193is not set. Only applicable if aggressive is true.</dd></dl>
194
195<dl class="describe">
196<dt>
197<tt class="descname">inverse</tt></dt>
198<dd><tt class="docutils literal"><span class="pre">Boolean</span></tt>
199If true, we will work with transparency instead of with opacity.
200Defaults to false.</dd></dl>
201
202<dl class="describe">
203<dt>
204<tt class="descname">layer</tt></dt>
205<dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> or <a title="GeoExt.data.LayerRecord" class="reference external" href="../data/LayerRecord.html#GeoExt.data.LayerRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerRecord</span></tt></a>
206The layer this slider changes the opacity of. (required)</dd></dl>
207
208<dl class="describe">
209<dt>
210<tt class="descname">value</tt></dt>
211<dd><tt class="docutils literal"><span class="pre">Number</span></tt>
212The value to initialize the slider with. This value is
213taken into account only if the layer&#8217;s opacity is null.
214If the layer&#8217;s opacity is null and this value is not
215defined in the config object then the slider initializes
216it to the max value.</dd></dl>
217
218</div>
219<div class="section" id="public-methods">
220<h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2>
221<p>Public methods in addition to those
222listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider">Ext.Slider</a>.</p>
223<dl class="method">
224<dt id="GeoExt.LayerOpacitySlider.setLayer">
225<tt class="descclassname">LayerOpacitySlider.</tt><tt class="descname">setLayer</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.LayerOpacitySlider.setLayer" title="Permalink to this definition">¶</a></dt>
226<dd><table class="docutils field-list" frame="void" rules="none">
227<col class="field-name" />
228<col class="field-body" />
229<tbody valign="top">
230<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>layer</em> &#8211; <tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> or <a title="GeoExt.data.LayerRecord" class="reference external" href="../data/LayerRecord.html#GeoExt.data.LayerRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerRecord</span></tt></a></td>
231</tr>
232</tbody>
233</table>
234<p>Bind a new layer to the opacity slider.</p>
235</dd></dl>
236
237</div>
238</div>
239
240
241          </div>
242        </div>
243      </div>
244      <div class="clearer"></div>
245    </div>
246    <div class="related">
247      <h3>Navigation</h3>
248      <ul>
249            <li class="right" style="margin-right: 10px">
250              <a href="../../../genindex.html" title="General Index"
251                 accesskey="I">index</a></li>
252            <li class="right" >
253              <a href="../../../modindex.html" title="Global Module Index"
254                 accesskey="M">modules</a> |</li>
255            <li class="right" >
256              <a href="LegendImage.html" title="GeoExt.LegendImage"
257                 accesskey="N">next</a> |</li>
258            <li class="right" >
259              <a href="LayerLegend.html" title="GeoExt.LayerLegend"
260                 accesskey="P">previous</a> |</li>
261        <li><a href="../../../index.html">GeoExt</a> &raquo;</li>
262          <li><a href="../../index.html" >API Reference</a> &raquo;</li>
263          <li><a href="../widgets.html" >Widgets</a> &raquo;</li>
264        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.LayerOpacitySlider</span></tt></a></li>
265      </ul>
266    </div>
267
268    <div class="footer">
269      &copy; Copyright 2009-2010, GeoExt Community.
270    </div>
271  </body>
272</html>
Note: See TracBrowser for help on using the repository browser.