source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_sources/lib/GeoExt/widgets/Popup.txt
@
76
Revision 76, 2.3 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | |
2 | .. currentmodule:: GeoExt |
3 | |
4 | :class:`GeoExt.Popup` |
5 | ================================================================================ |
6 | |
7 | |
8 | .. cssclass:: meta |
9 | |
10 | |
11 | Extends |
12 | * `Ext.Window <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Window>`_ |
13 | |
14 | |
15 | |
16 | |
17 | xtype |
18 | ``gx_popup`` |
19 | |
20 | |
21 | |
22 | |
23 | .. class:: Popup(config) |
24 | |
25 | Popups are a specialized Window that supports anchoring |
26 | to a particular location in a MapPanel. When a popup |
27 | is anchored to a location, that means that the popup |
28 | will visibly point to the location on the map, and move |
29 | accordingly when the map is panned or zoomed. |
30 | |
31 | |
32 | |
33 | Example Use |
34 | ----------- |
35 | |
36 | Sample code to create a popup anchored to a feature: |
37 | |
38 | .. code-block:: javascript |
39 | |
40 | var popup = new GeoExt.Popup({ |
41 | title: "My Popup", |
42 | location: feature, |
43 | width: 200, |
44 | html: "<div>Popup content</div>", |
45 | collapsible: true |
46 | }); |
47 | |
48 | |
49 | |
50 | |
51 | Config Options |
52 | -------------- |
53 | |
54 | Configuration properties in addition to |
55 | those listed for `Ext.Window <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Window>`_. |
56 | |
57 | |
58 | .. describe:: ancCls |
59 | |
60 | ``String`` CSS class name for the popup's anchor. |
61 | |
62 | .. describe:: anchored |
63 | |
64 | ``Boolean`` The popup begins anchored to its location. Default is |
65 | ``true``. |
66 | |
67 | .. describe:: location |
68 | |
69 | ``OpenLayers.Feature.Vector`` or ``OpenLayers.LonLat`` or |
70 | ``OpenLayers.Pixel`` or ``OpenLayers.Geometry`` A location for this |
71 | popup's anchor. |
72 | |
73 | .. describe:: map |
74 | |
75 | ``OpenLayers.Map`` or :class:`GeoExt.MapPanel` |
76 | The map this popup will be anchored to (only required if ``anchored`` |
77 | is set to true and the map cannot be derived from the ``location``'s |
78 | layer. |
79 | |
80 | .. describe:: panIn |
81 | |
82 | ``Boolean`` The popup should pan the map so that the popup is |
83 | fully in view when it is rendered. Default is ``true``. |
84 | |
85 | .. describe:: popupCls |
86 | |
87 | ``String`` CSS class name for the popup DOM elements. Default is |
88 | "gx-popup". |
89 | |
90 | .. describe:: unpinnable |
91 | |
92 | ``Boolean`` The popup should have a "unpin" tool that unanchors it from |
93 | its location. Default is ``true``. |
94 | |
95 | |
96 | |
97 | |
98 | |
99 | |
100 | Public Methods |
101 | -------------- |
102 | |
103 | Public methods in addition to those |
104 | listed for `Ext.Window <http://dev.sencha.com/deploy/dev/docs/?class=Ext.Window>`_. |
105 | |
106 | |
107 | .. method:: Popup.setSize |
108 | |
109 | :param w: ``Integer`` |
110 | :param h: ``Integer`` |
111 | |
112 | Sets the size of the popup, taking into account the size of the anchor. |
113 | |
114 | |
115 | |
116 | |
117 |
Note: See TracBrowser
for help on using the repository browser.