[OpenLayers-Users] help with popup-properties

Adrian Popa adrian_gh.popa at romtelecom.ro
Fri Aug 21 01:30:12 EDT 2009


Hello Maren,

For your first question try this:

...
feature.popup = popup;
*popup.keepInMap = true;
*map.addPopup(popup);

Regards,
Adrian

Maren Kiehl wrote:
> 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)
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090821/691cc039/attachment.html


More information about the Users mailing list