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/PrintMapPanel.html @ 76

Revision 76, 21.8 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.PrintMapPanel &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.UrlLegend" href="UrlLegend.html" />
26    <link rel="prev" title="GeoExt.Popup" href="Popup.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.PrintMapPanel</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.PrintMapPanel</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-properties">Public Properties</a></li>
73<li><a class="reference external" href="#public-methods">Public Methods</a></li>
74</ul>
75</li>
76</ul>
77
78            <h4>Previous topic</h4>
79            <p class="topless"><a href="Popup.html"
80                                  title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.Popup</span></tt></a></p>
81            <h4>Next topic</h4>
82            <p class="topless"><a href="UrlLegend.html"
83                                  title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.UrlLegend</span></tt></a></p>
84        </div>
85      </div>
86
87
88    <div class="document">
89      <div class="documentwrapper">
90        <div class="bodywrapper">
91          <div class="body">
92           
93  <div class="section" id="geoext-printmappanel">
94<h1><a title="GeoExt.PrintMapPanel" class="reference internal" href="#GeoExt.PrintMapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a><a class="headerlink" href="#geoext-printmappanel" title="Permalink to this headline">¶</a></h1>
95<dl class="meta docutils">
96<dt>Extends</dt>
97<dd><ul class="first last simple">
98<li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel">Ext.Panel</a></li>
99<li><a title="GeoExt.MapPanel" class="reference external" href="MapPanel.html#GeoExt.MapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.MapPanel</span></tt></a></li>
100</ul>
101</dd>
102<dt>xtype</dt>
103<dd><tt class="docutils literal"><span class="pre">gx_printmappanel</span></tt></dd>
104</dl>
105<dl class="class">
106<dt id="GeoExt.PrintMapPanel">
107<em class="property">class </em><tt class="descclassname">GeoExt.</tt><tt class="descname">PrintMapPanel</tt><a class="headerlink" href="#GeoExt.PrintMapPanel" title="Permalink to this definition">¶</a></dt>
108<dd></dd></dl>
109
110<p>A map panel that controls scale and center of a print page. Based on the
111current view (i.e. layers and extent) of a source map, this panel will be
112sized according to the aspect ratio of the print page. As the user zooms
113and pans in the <a title="GeoExt.PrintMapPanel" class="reference internal" href="#GeoExt.PrintMapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a>, the print page will update
114its scale and center accordingly. If the scale on the print page changes
115(e.g. by setting it using a combo box with a
116<a title="GeoExt.plugins.PrintPageField" class="reference external" href="../plugins/PrintPageField.html#GeoExt.plugins.PrintPageField"><tt class="xref docutils literal"><span class="pre">GeoExt.plugins.PrintPageField</span></tt></a>), the extent of the
117<a title="GeoExt.PrintMapPanel" class="reference internal" href="#GeoExt.PrintMapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a> will be updated to match the page bounds.</p>
118<div class="admonition note">
119<p class="first admonition-title">Note</p>
120<p class="last">The <tt class="docutils literal"><span class="pre">zoom</span></tt>, <tt class="docutils literal"><span class="pre">center</span></tt> and <tt class="docutils literal"><span class="pre">extent</span></tt> config options will have
121no affect, as they will be determined by the <tt class="docutils literal"><span class="pre">sourceMap</span></tt>.</p>
122</div>
123<div class="section" id="example-use">
124<h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2>
125<p>A map with a &#8220;Print...&#8221; button. If clicked, a dialog containing a
126PrintMapPanel will open, with a &#8220;Create PDF&#8221; button.</p>
127<div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">mapPanel</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>
128    <span class="nx">renderTo</span><span class="o">:</span> <span class="s2">&quot;map&quot;</span><span class="p">,</span>
129    <span class="nx">layers</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">Layer</span><span class="p">.</span><span class="nx">WMS</span><span class="p">(</span><span class="s2">&quot;Tasmania State Boundaries&quot;</span><span class="p">,</span>
130        <span class="s2">&quot;http://demo.opengeo.org/geoserver/wms&quot;</span><span class="p">,</span>
131        <span class="p">{</span><span class="nx">layers</span><span class="o">:</span> <span class="s2">&quot;topp:tasmania_state_boundaries&quot;</span><span class="p">},</span> <span class="p">{</span><span class="nx">singleTile</span><span class="o">:</span> <span class="kc">true</span><span class="p">})],</span>
132    <span class="nx">center</span><span class="o">:</span> <span class="p">[</span><span class="mf">146.56</span><span class="p">,</span> <span class="o">-</span><span class="mf">41.56</span><span class="p">],</span>
133    <span class="nx">zoom</span><span class="o">:</span> <span class="mi">6</span><span class="p">,</span>
134    <span class="nx">bbar</span><span class="o">:</span> <span class="p">[{</span>
135        <span class="nx">text</span><span class="o">:</span> <span class="s2">&quot;Print...&quot;</span><span class="p">,</span>
136        <span class="nx">handler</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
137            <span class="kd">var</span> <span class="nx">printDialog</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Ext</span><span class="p">.</span><span class="nx">Window</span><span class="p">({</span>
138                <span class="nx">autoHeight</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
139                <span class="nx">width</span><span class="o">:</span> <span class="mi">350</span><span class="p">,</span>
140                <span class="nx">items</span><span class="o">:</span> <span class="p">[</span><span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">PrintMapPanel</span><span class="p">({</span>
141                    <span class="nx">sourceMap</span><span class="o">:</span> <span class="nx">mapPanel</span><span class="p">,</span>
142                    <span class="nx">printProvider</span><span class="o">:</span> <span class="p">{</span>
143                        <span class="nx">capabilities</span><span class="o">:</span> <span class="nx">printCapabilities</span>
144                    <span class="p">}</span>
145                <span class="p">})],</span>
146                <span class="nx">bbar</span><span class="o">:</span> <span class="p">[{</span>
147                    <span class="nx">text</span><span class="o">:</span> <span class="s2">&quot;Create PDF&quot;</span><span class="p">,</span>
148                    <span class="nx">handler</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
149                        <span class="nx">printDialog</span><span class="p">.</span><span class="nx">items</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="mi">0</span><span class="p">).</span><span class="nx">print</span><span class="p">();</span>
150                    <span class="p">}</span>
151                <span class="p">}]</span>
152            <span class="p">});</span>
153            <span class="nx">printDialog</span><span class="p">.</span><span class="nx">show</span><span class="p">();</span>
154        <span class="p">}</span>
155    <span class="p">}]</span>
156<span class="p">});</span>
157</pre></div>
158</div>
159</div>
160<div class="section" id="config-options">
161<h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2>
162<p>Configuration properties in addition to
163those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel">Ext.Panel</a>.</p>
164<dl class="describe">
165<dt>
166<tt class="descname">center</tt></dt>
167<dd><tt class="docutils literal"><span class="pre">OpenLayers.LonLat</span></tt> or <tt class="docutils literal"><span class="pre">Array(Number)</span></tt>  A location for the map
168center. Do not set, as this will be overridden with the <tt class="docutils literal"><span class="pre">sourceMap</span></tt>
169center.</dd></dl>
170
171<dl class="describe">
172<dt>
173<tt class="descname">extent</tt></dt>
174<dd><tt class="docutils literal"><span class="pre">OpenLayers.Bounds</span> <span class="pre">or</span> <span class="pre">Array(Number)</span></tt>  An initial extent for the map.
175Do not set, because the initial extent will be determined by the
176<tt class="docutils literal"><span class="pre">sourceMap</span></tt>.</dd></dl>
177
178<dl class="describe">
179<dt>
180<tt class="descname">layers</tt></dt>
181<dd><tt class="docutils literal"><span class="pre">GeoExt.data.LayerStore</span> <span class="pre">or</span> <span class="pre">GeoExt.data.GroupingStore</span> <span class="pre">or</span> <span class="pre">Array(OpenLayers.Layer)</span></tt>
182A store holding records. The layers provided here will be added to this
183MapPanel&#8217;s map when it is rendered.</dd></dl>
184
185<dl class="describe">
186<dt>
187<tt class="descname">limitScales</tt></dt>
188<dd><tt class="docutils literal"><span class="pre">Boolean</span></tt> If set to true, the printPage cannot be set to scales that
189would generate a preview in this <a title="GeoExt.PrintMapPanel" class="reference internal" href="#GeoExt.PrintMapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a> with a
190completely different extent than the one that would appear on the
191printed map. Default is false.</dd></dl>
192
193<dl class="describe">
194<dt>
195<tt class="descname">map</tt></dt>
196<dd><tt class="docutils literal"><span class="pre">Object</span></tt> Optional configuration for the <tt class="docutils literal"><span class="pre">OpenLayers.Map</span></tt> object
197that this PrintMapPanel creates. Useful e.g. to configure a map with a
198custom set of controls, or to add a <tt class="docutils literal"><span class="pre">preaddlayer</span></tt> listener for
199filtering out layer types that cannot be printed.</dd></dl>
200
201<dl class="describe">
202<dt>
203<tt class="descname">prettyStateKeys</tt></dt>
204<dd><tt class="docutils literal"><span class="pre">Boolean</span></tt> Set this to true if you want pretty strings in the MapPanel&#8217;s
205state keys. More specifically, layer.name instead of layer.id will be used
206in the state keys if this option is set to true. But in that case you have
207to make sure you don&#8217;t have two layers with the same name. Defaults to
208false.</dd></dl>
209
210<dl class="describe">
211<dt>
212<tt class="descname">printProvider</tt></dt>
213<dd><p><a title="GeoExt.data.PrintProvider" class="reference external" href="../data/PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a> or <tt class="docutils literal"><span class="pre">Object</span></tt> PrintProvider to use
214for printing. If an <tt class="docutils literal"><span class="pre">Object</span></tt> is provided, a new PrintProvider will
215be created and configured with the object.</p>
216<div class="admonition note">
217<p class="first admonition-title">Note</p>
218<p class="last">The PrintMapPanel requires the printProvider&#8217;s capabilities
219to be available upon initialization. This means that a PrintMapPanel
220configured with an <tt class="docutils literal"><span class="pre">Object</span></tt> as <tt class="docutils literal"><span class="pre">printProvider</span></tt> will only work
221when <tt class="docutils literal"><span class="pre">capabilities</span></tt> is provided in the printProvider&#8217;s
222configuration object. If <tt class="docutils literal"><span class="pre">printProvider</span></tt> is provided as an instance
223of <a title="GeoExt.data.PrintProvider" class="reference external" href="../data/PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a>, the capabilities must be
224loaded before PrintMapPanel initialization.</p>
225</div>
226</dd></dl>
227
228<dl class="describe">
229<dt>
230<tt class="descname">sourceMap</tt></dt>
231<dd><a title="GeoExt.MapPanel" class="reference external" href="MapPanel.html#GeoExt.MapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.MapPanel</span></tt></a> or <tt class="docutils literal"><span class="pre">OpenLayers.Map</span></tt> The map that is to be
232printed.</dd></dl>
233
234<dl class="describe">
235<dt>
236<tt class="descname">zoom</tt></dt>
237<dd><tt class="docutils literal"><span class="pre">Number</span></tt>  An initial zoom level for the map. Do not set, because the
238initial extent will be determined by the <tt class="docutils literal"><span class="pre">sourceMap</span></tt>.</dd></dl>
239
240</div>
241<div class="section" id="public-properties">
242<h2>Public Properties<a class="headerlink" href="#public-properties" title="Permalink to this headline">¶</a></h2>
243<p>Public properties in addition to those
244listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel">Ext.Panel</a>.</p>
245<dl class="attribute">
246<dt id="GeoExt.PrintMapPanel.layers">
247<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">layers</tt><a class="headerlink" href="#GeoExt.PrintMapPanel.layers" title="Permalink to this definition">¶</a></dt>
248<dd><a title="GeoExt.data.LayerStore" class="reference external" href="../data/LayerStore.html#GeoExt.data.LayerStore"><tt class="xref docutils literal"><span class="pre">GeoExt.data.LayerStore</span></tt></a>  A store containing
249<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> objects.</dd></dl>
250
251<dl class="attribute">
252<dt id="GeoExt.PrintMapPanel.map">
253<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">map</tt><a class="headerlink" href="#GeoExt.PrintMapPanel.map" title="Permalink to this definition">¶</a></dt>
254<dd><tt class="docutils literal"><span class="pre">OpenLayers.Map</span></tt> or <tt class="docutils literal"><span class="pre">Object</span></tt>  A map or map configuration.</dd></dl>
255
256<dl class="attribute">
257<dt id="GeoExt.PrintMapPanel.previewScales">
258<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">previewScales</tt><a class="headerlink" href="#GeoExt.PrintMapPanel.previewScales" title="Permalink to this definition">¶</a></dt>
259<dd><tt class="docutils literal"><span class="pre">Ext.data.Store</span></tt> A data store with a subset of the printProvider&#8217;s
260scales. By default, this contains all the scales of the printProvider.
261If <tt class="docutils literal"><span class="pre">limitScales</span></tt> is set to true, it will only contain print scales
262that can properly be previewed with this <a title="GeoExt.PrintMapPanel" class="reference internal" href="#GeoExt.PrintMapPanel"><tt class="xref docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a>.</dd></dl>
263
264<dl class="attribute">
265<dt id="GeoExt.PrintMapPanel.printPage">
266<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">printPage</tt><a class="headerlink" href="#GeoExt.PrintMapPanel.printPage" title="Permalink to this definition">¶</a></dt>
267<dd><a title="GeoExt.data.PrintPage" class="reference external" href="../data/PrintPage.html#GeoExt.data.PrintPage"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintPage</span></tt></a> PrintPage for this PrintMapPanel.
268Read-only.</dd></dl>
269
270<dl class="attribute">
271<dt id="GeoExt.PrintMapPanel.printProvider">
272<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">printProvider</tt><a class="headerlink" href="#GeoExt.PrintMapPanel.printProvider" title="Permalink to this definition">¶</a></dt>
273<dd><a title="GeoExt.data.PrintProvider" class="reference external" href="../data/PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a> PrintProvider for this
274PrintMapPanel.</dd></dl>
275
276</div>
277<div class="section" id="public-methods">
278<h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2>
279<p>Public methods in addition to those
280listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel">Ext.Panel</a>.</p>
281<dl class="method">
282<dt id="GeoExt.PrintMapPanel.print">
283<tt class="descclassname">PrintMapPanel.</tt><tt class="descname">print</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.PrintMapPanel.print" title="Permalink to this definition">¶</a></dt>
284<dd><table class="docutils field-list" frame="void" rules="none">
285<col class="field-name" />
286<col class="field-body" />
287<tbody valign="top">
288<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>options</em> &#8211; <tt class="docutils literal"><span class="pre">Object</span></tt> options for
289the <a title="GeoExt.data.PrintProvider" class="reference external" href="../data/PrintProvider.html#GeoExt.data.PrintProvider"><tt class="xref docutils literal"><span class="pre">GeoExt.data.PrintProvider</span></tt></a> :: <tt class="docutils literal"><span class="pre">print</span></tt>  method.</td>
290</tr>
291</tbody>
292</table>
293<p>Convenience method for printing the map, without the need to
294interact with the printProvider and printPage.</p>
295</dd></dl>
296
297</div>
298</div>
299
300
301          </div>
302        </div>
303      </div>
304      <div class="clearer"></div>
305    </div>
306    <div class="related">
307      <h3>Navigation</h3>
308      <ul>
309            <li class="right" style="margin-right: 10px">
310              <a href="../../../genindex.html" title="General Index"
311                 accesskey="I">index</a></li>
312            <li class="right" >
313              <a href="../../../modindex.html" title="Global Module Index"
314                 accesskey="M">modules</a> |</li>
315            <li class="right" >
316              <a href="UrlLegend.html" title="GeoExt.UrlLegend"
317                 accesskey="N">next</a> |</li>
318            <li class="right" >
319              <a href="Popup.html" title="GeoExt.Popup"
320                 accesskey="P">previous</a> |</li>
321        <li><a href="../../../index.html">GeoExt</a> &raquo;</li>
322          <li><a href="../../index.html" >API Reference</a> &raquo;</li>
323          <li><a href="../widgets.html" >Widgets</a> &raquo;</li>
324        <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.PrintMapPanel</span></tt></a></li>
325      </ul>
326    </div>
327
328    <div class="footer">
329      &copy; Copyright 2009-2010, GeoExt Community.
330    </div>
331  </body>
332</html>
Note: See TracBrowser for help on using the repository browser.