<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><font face="arial" size="2">I need to create a OpenLayers.Popup which fills the whole viewport (so that I can covering the map temporarily).</font><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">I discovered by accident that passing null as the lonlat position parameter of the constructor makes the popup top-left positioned at pixel 0,0 of the viewport. So the constructor below creates a popup which covers the whole viewport - exactly what I want:</div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; "><div>var popup = new OpenLayers.Popup(null, null, <span style="font-size: 10pt; ">map.getSize(),</span></div><div><span class="Apple-tab-span" style="font-size: 10pt; white-space: pre; "> </span><span style="font-size: 10pt; ">
"<h1>My message text</h1>",</span></div><div> false,</div><div> null);</div><div>map.addPopup(popup);</div></div><div style="font-family: arial; font-size: 10pt; "><br></div><div style="font-family: arial; font-size: 10pt; ">and when the window gets resized I just have to call</div><div style="font-family: arial; font-size: 10pt; "><br></div><div><font face="arial" size="2">popup.setSize(map.getSize());</font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">which makes it cover the whole of the new viewport area.</font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">But
passing null as the lonlat parameter is not mentioned in the documentation, so is this behaviour by design and I can safely use it, or is it just an unexpected behaviour that is unsafe to use?</font></div><div><font face="arial" size="2"><br></font></div><div><font face="arial" size="2">I would have expected the constructor to fail if it was passed an unsupported argument type</font></div><div><font face="arial" size="2">.</font></div></td></tr></table>