<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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 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><div>But the popup will move out of that location whenever you pan. It's 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></div><br><br></body>
</html>