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/widgets/ZoomSlider.txt @ 76

Revision 76, 2.5 KB checked in by djay, 12 years ago (diff)

Ajout du répertoire web

  • Property svn:executable set to *
Line 
1
2.. currentmodule:: GeoExt
3
4:class:`GeoExt.ZoomSlider`
5================================================================================
6
7
8.. cssclass:: meta
9
10
11Extends
12    * `Ext.Slider <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider>`_
13   
14
15
16
17xtype
18    ``gx_zoomslider``
19
20
21
22
23.. class:: ZoomSlider(config)
24
25    Create a slider for controlling a map's zoom level.
26
27
28
29Example Use
30-----------
31
32Sample code to render a slider outside the map viewport:
33
34.. code-block:: javascript
35
36    var slider = new GeoExt.ZoomSlider({
37        renderTo: document.body,
38        width: 200,
39        map: map
40    });
41
42Sample code to add a slider to a map panel:
43
44.. code-block:: javascript
45
46    var panel = new GeoExt.MapPanel({
47        renderTo: document.body,
48        height: 300,
49        width: 400,
50        map: {
51            controls: [new OpenLayers.Control.Navigation()]
52        },
53        layers: [new OpenLayers.Layer.WMS(
54            "Global Imagery",
55            "http://maps.opengeo.org/geowebcache/service/wms",
56            {layers: "bluemarble"}
57        )],
58        extent: [-5, 35, 15, 55],
59        items: [{
60            xtype: "gx_zoomslider",
61            aggressive: true,
62            vertical: true,
63            height: 100,
64            x: 10,
65            y: 20
66        }]
67    });
68
69   
70
71
72Config Options
73--------------
74
75Configuration properties in addition to
76those listed for `Ext.Slider <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider>`_.
77
78
79.. describe:: aggressive
80
81    ``Boolean``
82    If set to true, the map is zoomed as soon as the thumb is moved. Otherwise
83    the map is zoomed when the thumb is released (default).
84
85.. describe:: baseCls
86
87    ``String``
88    The CSS class name for the slider elements.  Default is "gx-zoomslider".
89
90.. describe:: map
91
92    ``OpenLayers.Map`` or :class:`GeoExt.MapPanel`
93    The map that the slider controls.
94
95
96
97
98
99
100Public Methods
101--------------
102
103Public methods in addition to those
104listed for `Ext.Slider <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Slider>`_.
105
106
107.. method:: ZoomSlider.getResolution
108
109    :return: ``Number`` The map resolution.
110   
111    Get the resolution for the associated map based on the slider value.
112
113.. method:: ZoomSlider.getScale
114
115    :return: ``Number`` The map scale denominator.
116   
117    Get the scale denominator for the associated map based on the slider value.
118
119.. method:: ZoomSlider.getZoom
120
121    :return: ``Number`` The map zoom level.
122   
123    Get the zoom level for the associated map based on the slider value.
124
125
126
127
128
Note: See TracBrowser for help on using the repository browser.