[OpenLayers-Users] Pop-up auto size problem

Xavier Mamano (jorix) xavier.mamano at gmail.com
Sat Mar 23 08:43:25 PDT 2013


Hi Albrecht,

Try:

.olPopupContent {
    padding: 0 5px;
    border: #faf solid;
    border-width: 5px 0;
}

not elegant but it works.

(This does not work without the patch)

Regards,

Xavier


Albrecht Lohöfener wrote
> 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
> _______________________________________________
> Users mailing list

> Users at .osgeo

> http://lists.osgeo.org/mailman/listinfo/openlayers-users





--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Pop-up-auto-size-problem-tp5040499p5042504.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list