[OpenLayers-Users] Pop-up auto size problem

Albrecht Lohöfener albrechtloh at gmx.de
Tue Mar 19 19:04:08 PDT 2013


Hi Xavier,

Thank you very much for your tips. Now I'm using the settings that your 
mentioned and I don't have the auto size problem.
-----------
feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud,
         {
             "autoSize": true,
             "panMapIfOutOfView": false,
             "keepInMap": false,
             "contentDisplayClass": "olPopupContent",
             [...]
         });
-----------

Unfortunately there is a new problem: When the vertical scroll bar is 
showed than the class "olPopupContent" is inside the scroll bar area. 
But I'm using this class for the edge padding. Now the pop-ups with the 
scroll bar doesn't look nice because the space between the content and 
the pop-up edge is too small. Do you know how to increase this padding?

Bye, Albrecht

Am 17.03.2013 05:54, schrieb Xavier Mamano (jorix):
> typo:
>   * the window should be higher ...
> must be
>   * the popup should be higher ...
>
>
> Xavier Mamano (jorix) wrote
>> Hi Albrecht,
>>
>> I have looked at the function `function AddMarker()` from "osm-plugin.js"
>>
>> Uses a popup class with `... "panMapIfOutOfView": false, "keepInMap":
>> true, ...` (is a cocktail that I do not like)
>>
>> So when Toronto is in the middle of the map div:
>>   * the window should be higher than the middle of the height of map div
>> (minus a margin),
>>   * the map can not move ["panMapIfOutOfView"=false],
>>   * and the popup should be all within the map ["keepInMap"=true],
>>   * so the text of the list popup is cut.
>>
>> You really want: "panMapIfOutOfView"=false and "keepInMap"=true?
>>
>>
>> And is set `feature.data.overflow = "hidden";`
>>
>> Try to remove the line `feature.data.overflow = "hidden";`,
>> in principle scrollbars should be displayed only if necessary, as in this
>> case.
>>
>> Regards,
>>
>> Xavier


More information about the Users mailing list