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/_sources/lib/GeoExt/plugins/PrintExtent.txt @ 76

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

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1
2.. currentmodule:: GeoExt.plugins
3
4:class:`GeoExt.plugins.PrintExtent`
5================================================================================
6
7
8.. cssclass:: meta
9
10
11
12
13
14ptype
15    ``gx_printextent``
16
17
18
19.. class:: PrintExtent
20
21Provides a way to show and modify the extents of print pages on the map. It
22uses a layer to render the page extent and handle features of print pages,
23and provides a control to modify them. Must be set as a plugin to a
24:class:`GeoExt.MapPanel`.
25
26
27
28Example Use
29-----------
30
31Sample code to create a MapPanel with a PrintExtent, and print it
32immediately:
33
34.. code-block:: javascript
35
36    var printExtent = new GeoExt.plugins.PrintExtent({
37        printProvider: new GeoExt.data.PrintProvider({
38            capabilities: printCapabilities
39        })
40    });
41
42    var mapPanel = new GeoExt.MapPanel({
43        border: false,
44        renderTo: "div-id",
45        layers: [new OpenLayers.Layer.WMS("Tasmania", "http://demo.opengeo.org/geoserver/wms",
46            {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})],
47        center: [146.56, -41.56],
48        zoom: 6,
49        plugins: printExtent
50    });
51
52    printExtent.addPage();
53
54    // print the map
55    printExtent.print();
56
57   
58
59
60Config Options
61--------------
62
63Configuration properties.
64
65
66.. describe:: layer
67
68    ``OpenLayers.Layer.Vector`` The layer used to render extent and handle
69    features to. Optional, will be created if not provided.
70
71.. describe:: pages
72
73    Array of :class:`GeoExt.data.PrintPage` The pages that this plugin
74    controls. Optional. If not provided, it will be created with one page
75    that is completely contained within the visible map extent.
76   
77    .. note:: All pages must use the same PrintProvider.
78
79.. describe:: printProvider
80
81    :class:`GeoExt.data.PrintProvider` The print provider this form
82    is connected to. Optional if pages are provided.
83
84
85
86
87Public Properties
88-----------------
89
90Public properties.
91
92
93.. attribute:: PrintExtent.page
94
95    :class:`GeoExt.data.PrintPage` The page currently set for
96    transformation.
97
98.. attribute:: PrintExtent.pages
99
100    Array of :class:`GeoExt.data.PrintPage` The pages that this component
101    controls. Read-only.
102
103.. attribute:: PrintExtent.printProvider
104
105    :class:`GeoExt.data.PrintProvider` The print provider this form
106    is connected to. Read-only.
107
108
109
110
111Public Methods
112--------------
113
114Public methods.
115
116
117.. method:: PrintExtent.addPage
118
119    :param page: :class:`GeoExt.data.PrintPage` The page to add
120         to this plugin. If not provided, a page that fits the current
121         extent is created.
122    :return: page :class:``GeoExt.data.PrintPage``
123   
124    Adds a page to the list of pages that this plugin controls.
125
126.. method:: PrintExtent.hide
127
128    Tear downs the plugin, removing the
129    ``OpenLayers.Control.TransformFeature`` control and
130    the ``OpenLayers.Layer.Vector`` layer.
131
132.. method:: PrintExtent.print
133
134    :param options: ``Object`` Options to send to the PrintProvider's
135        print method. See :class:`GeoExt.data.PrintProvider` :: ``print``.
136   
137    Prints all pages as shown on the map.
138
139.. method:: PrintExtent.removePage
140
141    :param page: :class:`GeoExt.data.PrintPage` The page to remove
142         from this plugin.
143   
144    Removes a page from the list of pages that this plugin controls.
145
146.. method:: PrintExtent.selectPage
147
148    :param page: :class:`GeoExt.data.PrintPage` The page to select
149   
150    Selects the given page (ie. calls the setFeature on the modify feature
151    control)
152
153.. method:: PrintExtent.show
154
155    Sets up the plugin, initializing the ``OpenLayers.Layer.Vector``
156    layer and ``OpenLayers.Control.TransformFeature``, and centering
157    the first page if no pages were specified in the configuration.
158
159
160
161
162Events
163------
164
165Events.
166
167
168.. describe:: selectpage
169
170    Triggered when a page has been selected using the control
171   
172    Listener arguments:
173    * printPage - :class:`GeoExt.data.PrintPage` this printPage
174
175
176
Note: See TracBrowser for help on using the repository browser.