1
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
2
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
3
* full text of the license. */
6
* @requires OpenLayers/Popup/Framed.js
7
* @requires OpenLayers/Util.js
11
* Class: OpenLayers.Popup.FramedCloud
14
* - <OpenLayers.Popup.Framed>
16
OpenLayers.Popup.FramedCloud =
17
OpenLayers.Class(OpenLayers.Popup.Framed, {
20
* Property: contentDisplayClass
21
* {String} The CSS class of the popup content div.
23
contentDisplayClass: "olFramedCloudPopupContent",
26
* APIProperty: autoSize
27
* {Boolean} Framed Cloud is autosizing by default.
32
* APIProperty: panMapIfOutOfView
33
* {Boolean} Framed Cloud does pan into view by default.
35
panMapIfOutOfView: true,
38
* APIProperty: imageSize
41
imageSize: new OpenLayers.Size(676, 736),
44
* APIProperty: isAlphaImage
45
* {Boolean} The FramedCloud does not use an alpha image (in honor of the
46
* good ie6 folk out there)
51
* APIProperty: fixedRelativePosition
52
* {Boolean} The Framed Cloud popup works in just one fixed position.
54
fixedRelativePosition: false,
57
* Property: positionBlocks
58
* {Object} Hash of differen position blocks, keyed by relativePosition
59
* two-character code string (ie "tl", "tr", "bl", "br")
63
'offset': new OpenLayers.Pixel(44, 0),
64
'padding': new OpenLayers.Bounds(8, 40, 8, 9),
67
size: new OpenLayers.Size('auto', 'auto'),
68
anchor: new OpenLayers.Bounds(0, 51, 22, 0),
69
position: new OpenLayers.Pixel(0, 0)
72
size: new OpenLayers.Size(22, 'auto'),
73
anchor: new OpenLayers.Bounds(null, 50, 0, 0),
74
position: new OpenLayers.Pixel(-638, 0)
77
size: new OpenLayers.Size('auto', 21),
78
anchor: new OpenLayers.Bounds(0, 32, 80, null),
79
position: new OpenLayers.Pixel(0, -629)
82
size: new OpenLayers.Size(22, 21),
83
anchor: new OpenLayers.Bounds(null, 32, 0, null),
84
position: new OpenLayers.Pixel(-638, -629)
87
size: new OpenLayers.Size(81, 54),
88
anchor: new OpenLayers.Bounds(null, 0, 0, null),
89
position: new OpenLayers.Pixel(0, -668)
94
'offset': new OpenLayers.Pixel(-45, 0),
95
'padding': new OpenLayers.Bounds(8, 40, 8, 9),
98
size: new OpenLayers.Size('auto', 'auto'),
99
anchor: new OpenLayers.Bounds(0, 51, 22, 0),
100
position: new OpenLayers.Pixel(0, 0)
103
size: new OpenLayers.Size(22, 'auto'),
104
anchor: new OpenLayers.Bounds(null, 50, 0, 0),
105
position: new OpenLayers.Pixel(-638, 0)
108
size: new OpenLayers.Size('auto', 21),
109
anchor: new OpenLayers.Bounds(0, 32, 22, null),
110
position: new OpenLayers.Pixel(0, -629)
113
size: new OpenLayers.Size(22, 21),
114
anchor: new OpenLayers.Bounds(null, 32, 0, null),
115
position: new OpenLayers.Pixel(-638, -629)
118
size: new OpenLayers.Size(81, 54),
119
anchor: new OpenLayers.Bounds(0, 0, null, null),
120
position: new OpenLayers.Pixel(-215, -668)
125
'offset': new OpenLayers.Pixel(45, 0),
126
'padding': new OpenLayers.Bounds(8, 9, 8, 40),
129
size: new OpenLayers.Size('auto', 'auto'),
130
anchor: new OpenLayers.Bounds(0, 21, 22, 32),
131
position: new OpenLayers.Pixel(0, 0)
134
size: new OpenLayers.Size(22, 'auto'),
135
anchor: new OpenLayers.Bounds(null, 21, 0, 32),
136
position: new OpenLayers.Pixel(-638, 0)
139
size: new OpenLayers.Size('auto', 21),
140
anchor: new OpenLayers.Bounds(0, 0, 22, null),
141
position: new OpenLayers.Pixel(0, -629)
144
size: new OpenLayers.Size(22, 21),
145
anchor: new OpenLayers.Bounds(null, 0, 0, null),
146
position: new OpenLayers.Pixel(-638, -629)
149
size: new OpenLayers.Size(81, 54),
150
anchor: new OpenLayers.Bounds(null, null, 0, 0),
151
position: new OpenLayers.Pixel(-101, -674)
156
'offset': new OpenLayers.Pixel(-44, 0),
157
'padding': new OpenLayers.Bounds(8, 9, 8, 40),
160
size: new OpenLayers.Size('auto', 'auto'),
161
anchor: new OpenLayers.Bounds(0, 21, 22, 32),
162
position: new OpenLayers.Pixel(0, 0)
165
size: new OpenLayers.Size(22, 'auto'),
166
anchor: new OpenLayers.Bounds(null, 21, 0, 32),
167
position: new OpenLayers.Pixel(-638, 0)
170
size: new OpenLayers.Size('auto', 21),
171
anchor: new OpenLayers.Bounds(0, 0, 22, null),
172
position: new OpenLayers.Pixel(0, -629)
175
size: new OpenLayers.Size(22, 21),
176
anchor: new OpenLayers.Bounds(null, 0, 0, null),
177
position: new OpenLayers.Pixel(-638, -629)
180
size: new OpenLayers.Size(81, 54),
181
anchor: new OpenLayers.Bounds(0, null, null, 0),
182
position: new OpenLayers.Pixel(-311, -674)
189
* APIProperty: minSize
190
* {<OpenLayers.Size>}
192
minSize: new OpenLayers.Size(105, 10),
195
* APIProperty: maxSize
196
* {<OpenLayers.Size>}
198
maxSize: new OpenLayers.Size(600, 660),
201
* Constructor: OpenLayers.Popup.FramedCloud
205
* lonlat - {<OpenLayers.LonLat>}
206
* contentSize - {<OpenLayers.Size>}
207
* contentHTML - {String}
208
* anchor - {Object} Object to which we'll anchor the popup. Must expose
209
* a 'size' (<OpenLayers.Size>) and 'offset' (<OpenLayers.Pixel>)
210
* (Note that this is generally an <OpenLayers.Icon>).
211
* closeBox - {Boolean}
212
* closeBoxCallback - {Function} Function to be called on closeBox click.
214
initialize:function(id, lonlat, contentSize, contentHTML, anchor, closeBox,
217
this.imageSrc = OpenLayers.Util.getImagesLocation() + 'cloud-popup-relative.png';
218
OpenLayers.Popup.Framed.prototype.initialize.apply(this, arguments);
219
this.contentDiv.className = this.contentDisplayClass;
225
destroy: function() {
226
OpenLayers.Popup.Framed.prototype.destroy.apply(this, arguments);
229
CLASS_NAME: "OpenLayers.Popup.FramedCloud"