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