source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_sources/lib/GeoExt/widgets/LegendPanel.txt
@
76
Revision 76, 1.5 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | |
2 | .. currentmodule:: GeoExt |
3 | |
4 | :class:`GeoExt.LegendPanel` |
5 | ================================================================================ |
6 | |
7 | |
8 | .. cssclass:: meta |
9 | |
10 | |
11 | Extends |
12 | * `Ext.Panel <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel>`_ |
13 | |
14 | |
15 | |
16 | |
17 | xtype |
18 | ``gx_legendpanel`` |
19 | |
20 | |
21 | |
22 | |
23 | .. class:: LegendPanel(config) |
24 | |
25 | A panel showing legends of all layers in a layer store. |
26 | Depending on the layer type, a legend renderer will be chosen. |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | Config Options |
33 | -------------- |
34 | |
35 | Configuration properties in addition to |
36 | those listed for `Ext.Panel <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Panel>`_. |
37 | |
38 | |
39 | .. describe:: dynamic |
40 | |
41 | ``Boolean`` |
42 | If false the LegendPanel will not listen to the add, remove and change |
43 | events of the LayerStore. So it will load with the initial state of |
44 | the LayerStore and not change anymore. |
45 | |
46 | .. describe:: filter |
47 | |
48 | ``Function`` |
49 | A function, called in the scope of the legend panel, with a layer record |
50 | as argument. Is expected to return true for layers to be displayed, false |
51 | otherwise. By default, all layers will be displayed. |
52 | |
53 | .. code-block:: javascript |
54 | |
55 | filter: function(record) { |
56 | return record.getLayer().isBaseLayer; |
57 | } |
58 | |
59 | .. describe:: layerStore |
60 | |
61 | ``GeoExt.data.LayerStore`` |
62 | The layer store containing layers to be displayed in the legend |
63 | container. If not provided it will be taken from the MapPanel. |
64 | |
65 | .. describe:: preferredTypes |
66 | |
67 | ``Array(String)`` An array of preferred legend types. |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 |
Note: See TracBrowser
for help on using the repository browser.