[OpenLayers-Users] help with popup-properties

Maren Kiehl maren.kiehl at gmx.de
Thu Aug 20 10:15:48 EDT 2009


Hi everyone,

I have a problem with the popup in my map: When I click a point a popup 
with some informations is shown. The problem is that it isn't in the 
current map size so I have to pan to the right position to be able to 
read it.
In the documentation I found a property named "keepInMap {boolean}" but 
I don't know how to use it. This is my popup-constructor:

 popup = new OpenLayers.Popup("info",
                                     
feature.geometry.getBounds().getCenterLonLat(),
                                     new OpenLayers.Size(350,200),
                                     "test test test test",
                                     false, onPopupClose);
           
            feature.popup = popup;
            map.addPopup(popup);

Could anybody help me with using this property?
And another question: Which value do I have to use in the constructor 
for showing the popup at the right border of the map? At the moment the 
upper left corner of the popup is located in the center of the point 
which was clicked.

Thanks for helping me.
Bye, Maren

-------------------
Maren Kiehl
mail: maren.kiehl at gmx.de
(student bachelor of science geoinformatics)




More information about the Users mailing list