<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br><br><div>I have tried that.<br><br>Something like<br><br>&nbsp;if (popup != null)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var widthPixel = map.getSize().w - 280;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var heightPixel = map.getSize().h - 300;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; popup.moveTo(new OpenLayers.Pixel(widthPixel, heightPixel));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></div><br>But the popup does not want to move when i pan. <br>It only move if i zoom in/out.<br>I have debug'ed this and "pop.moveTo" is being called whenever i pan.<br><br>Not really sure if this is a bug.<br><br>I just want a simple popup that always appear on the lower right corner <br>so user can interact with the map.<br><br>Regards.<br><br><br>&gt; Date: Thu, 16 Jul 2009 08:18:27 -0400<br>&gt; From: adube@mapgears.com<br>&gt; To: kwonghu@hotmail.com<br>&gt; CC: users@openlayers.org<br>&gt; Subject: Re: [OpenLayers-Users] Popup in Openlayers (How to fix the popup?)<br>&gt; <br>&gt; Hi,<br>&gt; <br>&gt;   You could register a map 'moveend' event to move the popup again to <br>&gt; the original location.  You would need to recalculate the position on <br>&gt; each move.<br>&gt; <br>&gt; Regards,<br>&gt; <br>&gt; Alexandre<br>&gt; <br>&gt; Kwong Hu Kiu wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; I am trying to use the openlayers popup in the map as below.<br>&gt; &gt;<br>&gt; &gt;      if (this.popup == null)<br>&gt; &gt;             {<br>&gt; &gt;                 this.popup = new OpenLayers.Popup();<br>&gt; &gt;                 this.popup.setBorder("2px solid");<br>&gt; &gt;                 this.popup.setSize(new OpenLayers.Size(270, 270));<br>&gt; &gt;                 this.popup.setContentHTML(popupContentHTML);<br>&gt; &gt;                 this.popup.setOpacity(0.65);<br>&gt; &gt;                 this.popup.addCloseBox();<br>&gt; &gt;                 map.addPopup(this.popup);<br>&gt; &gt;                 this.popup.show();<br>&gt; &gt;             }<br>&gt; &gt;             else<br>&gt; &gt;             {<br>&gt; &gt;                 this.popup.setContentHTML(popupContentHTML);<br>&gt; &gt;                 this.popup.toggle();<br>&gt; &gt;             }<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; How do i get it to display in one position (like the lower left <br>&gt; &gt; portion of the screen) ? and always appear there whenever you pan/zoom<br>&gt; &gt;<br>&gt; &gt; I figured that i can use popup.moveTo as below.<br>&gt; &gt;<br>&gt; &gt; var widthPixel = map.getSize().w - 280;<br>&gt; &gt; var heightPixel = map.getSize().h - 300;<br>&gt; &gt; this.popup.moveTo(new OpenLayers.Pixel(widthPixel, heightPixel));<br>&gt; &gt;<br>&gt; &gt; But the popup will move out of that location whenever you pan. It's <br>&gt; &gt; alright when you zoom in/out(always at the lower left) but not pan.<br>&gt; &gt;<br>&gt; &gt; Please help. Simple problem taking me a while to resolve.<br>&gt; &gt;<br>&gt; &gt; Cheers.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Users mailing list<br>&gt; &gt; Users@openlayers.org<br>&gt; &gt; http://openlayers.org/mailman/listinfo/users<br>&gt; &gt;   <br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Alexandre Dubé<br>&gt; Mapgears<br>&gt; www.mapgears.com<br>&gt; <br></body>
</html>