<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>

<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN 
class=078205520-16072009>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN 
class=078205520-16072009></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><SPAN 
class=078205520-16072009>I use a couple of movable divs for different 
tasks</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff><A 
href="http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?KARTE=k10000">http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?KARTE=k10000</A></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=078205520-16072009><FONT face=Arial 
color=#0000ff>Arnd</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>Von:</B> Kwong Hu Kiu [mailto:kwonghu@hotmail.com] 
<BR><B>Gesendet:</B> Donnerstag, 16. Juli 2009 19:41<BR><B>An:</B> 
arnd.wippermann@web.de; users@openlayers.org<BR><B>Betreff:</B> RE: AW: 
[OpenLayers-Users] Popup in Openlayers (How to fix the 
popup?)<BR></FONT><BR></DIV>
<DIV></DIV><BR><BR>
<DIV>&nbsp;Any example ? I have the map as a 
fullscreen.<BR></DIV><BR>Thanks.<BR><BR><BR>
<HR id=stopSpelling>
From: arnd.wippermann@web.de<BR>To: kwonghu@hotmail.com<BR>Subject: AW: 
[OpenLayers-Users] Popup in Openlayers (How to fix the popup?)<BR>Date: Thu, 16 
Jul 2009 18:31:52 +0200<BR><BR>
<STYLE>.ExternalClass .EC_hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ExternalClass BODY.EC_hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>

<DIV dir=ltr align=left><SPAN class=EC_656342716-16072009><FONT face=Arial 
color=#0000ff>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_656342716-16072009><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_656342716-16072009><FONT face=Arial 
color=#0000ff>Why do you not&nbsp;create an own div element instead of an 
OpenLayers popup? It will always be at&nbsp;the same position without calling 
any events.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=EC_656342716-16072009><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=EC_656342716-16072009><FONT face=Arial 
color=#0000ff>Arnd</FONT></SPAN></DIV><BR>
<DIV class=EC_OutlookMessageHeader lang=de dir=ltr align=left>
<HR>
<FONT face=Tahoma><B>Von:</B> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Kwong Hu 
Kiu<BR><B>Gesendet:</B> Donnerstag, 16. Juli 2009 16:32<BR><B>An:</B> 
adube@mapgears.com<BR><B>Cc:</B> users@openlayers.org<BR><B>Betreff:</B> Re: 
[OpenLayers-Users] Popup in Openlayers (How to fix the 
popup?)<BR></FONT><BR></DIV>
<DIV></DIV><BR>Yes, the moveend is triggered on every pan but it's not moving 
the popup.<BR><BR>The popup.moveto is always being called.<BR><BR>Any idea 
?<BR><BR>&gt; Date: Thu, 16 Jul 2009 09:45:34 -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; Could you share 
more of your code, please ? How do you register you <BR>&gt; event for instance 
? The 'moveend' event should be triggered on every pan.<BR>&gt; <BR>&gt; 
Regards,<BR>&gt; <BR>&gt; Alexandre<BR>&gt; <BR>&gt; Kwong Hu Kiu wrote:<BR>&gt; 
&gt;<BR>&gt; &gt;<BR>&gt; &gt; I have tried that.<BR>&gt; &gt;<BR>&gt; &gt; 
Something like<BR>&gt; &gt;<BR>&gt; &gt; if (popup != null)<BR>&gt; &gt; 
{<BR>&gt; &gt; <BR>&gt; &gt; var widthPixel = map.getSize().w - 280;<BR>&gt; 
&gt; var heightPixel = map.getSize().h - 300;<BR>&gt; &gt; popup.moveTo(new 
OpenLayers.Pixel(widthPixel, <BR>&gt; &gt; heightPixel));<BR>&gt; &gt; }<BR>&gt; 
&gt;<BR>&gt; &gt; But the popup does not want to move when i pan.<BR>&gt; &gt; 
It only move if i zoom in/out.<BR>&gt; &gt; I have debug'ed this and 
"pop.moveTo" is being called whenever i pan.<BR>&gt; &gt;<BR>&gt; &gt; Not 
really sure if this is a bug.<BR>&gt; &gt;<BR>&gt; &gt; I just want a simple 
popup that always appear on the lower right corner<BR>&gt; &gt; so user can 
interact with the map.<BR>&gt; &gt;<BR>&gt; &gt; Regards.<BR>&gt; &gt;<BR>&gt; 
&gt;<BR>&gt; &gt; &gt; Date: Thu, 16 Jul 2009 08:18:27 -0400<BR>&gt; &gt; &gt; 
From: adube@mapgears.com<BR>&gt; &gt; &gt; To: kwonghu@hotmail.com<BR>&gt; &gt; 
&gt; CC: users@openlayers.org<BR>&gt; &gt; &gt; Subject: Re: [OpenLayers-Users] 
Popup in Openlayers (How to fix the <BR>&gt; &gt; popup?)<BR>&gt; &gt; 
&gt;<BR>&gt; &gt; &gt; Hi,<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; You could 
register a map 'moveend' event to move the popup again to<BR>&gt; &gt; &gt; the 
original location. You would need to recalculate the position on<BR>&gt; &gt; 
&gt; each move.<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Regards,<BR>&gt; &gt; 
&gt;<BR>&gt; &gt; &gt; Alexandre<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; Kwong Hu 
Kiu wrote:<BR>&gt; &gt; &gt; &gt; Hi,<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; 
&gt; I am trying to use the openlayers popup in the map as below.<BR>&gt; &gt; 
&gt; &gt;<BR>&gt; &gt; &gt; &gt; if (this.popup == null)<BR>&gt; &gt; &gt; &gt; 
{<BR>&gt; &gt; &gt; &gt; this.popup = new OpenLayers.Popup();<BR>&gt; &gt; &gt; 
&gt; this.popup.setBorder("2px solid");<BR>&gt; &gt; &gt; &gt; 
this.popup.setSize(new OpenLayers.Size(270, 270));<BR>&gt; &gt; &gt; &gt; 
this.popup.setContentHTML(popupContentHTML);<BR>&gt; &gt; &gt; &gt; 
this.popup.setOpacity(0.65);<BR>&gt; &gt; &gt; &gt; 
this.popup.addCloseBox();<BR>&gt; &gt; &gt; &gt; 
map.addPopup(this.popup);<BR>&gt; &gt; &gt; &gt; this.popup.show();<BR>&gt; &gt; 
&gt; &gt; }<BR>&gt; &gt; &gt; &gt; else<BR>&gt; &gt; &gt; &gt; {<BR>&gt; &gt; 
&gt; &gt; this.popup.setContentHTML(popupContentHTML);<BR>&gt; &gt; &gt; &gt; 
this.popup.toggle();<BR>&gt; &gt; &gt; &gt; }<BR>&gt; &gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; How do i get it to display in one position 
(like the lower left<BR>&gt; &gt; &gt; &gt; portion of the screen) ? and always 
appear there whenever you pan/zoom<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; 
I figured that i can use popup.moveTo as below.<BR>&gt; &gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt; var widthPixel = map.getSize().w - 280;<BR>&gt; &gt; &gt; &gt; 
var heightPixel = map.getSize().h - 300;<BR>&gt; &gt; &gt; &gt; 
this.popup.moveTo(new OpenLayers.Pixel(widthPixel, heightPixel));<BR>&gt; &gt; 
&gt; &gt;<BR>&gt; &gt; &gt; &gt; But the popup will move out of that location 
whenever you pan. It's<BR>&gt; &gt; &gt; &gt; alright when you zoom 
in/out(always at the lower left) but not pan.<BR>&gt; &gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt; Please help. Simple problem taking me a while to resolve.<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; Cheers.<BR>&gt; &gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; <BR>&gt; &gt; 
------------------------------------------------------------------------<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; 
_______________________________________________<BR>&gt; &gt; &gt; &gt; Users 
mailing list<BR>&gt; &gt; &gt; &gt; Users@openlayers.org<BR>&gt; &gt; &gt; &gt; 
http://openlayers.org/mailman/listinfo/users<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; 
&gt;<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; --<BR>&gt; &gt; &gt; Alexandre 
Dubé<BR>&gt; &gt; &gt; Mapgears<BR>&gt; &gt; &gt; www.mapgears.com<BR>&gt; &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>