OpenLayers FramedCloud Autosizing

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2012-09-26T15:36:41Z Indexed on 2012/09/26 15:37 UTC
Read the original article Hit count: 243

Filed under:
|
|

According to the documentation, I should be able to configure the size of my OpenLayers popup by declaring an OpenLayers.Size object in the FramedCloud constructor:

this.popup = new OpenLayers.Popup.FramedCloud('featurePopup',
    this.options.feature.geometry.getBounds().getCenterLonLat(),
    new OpenLayers.Size(80, 60),
    this.template(this.formattedAttrs()),
    null, true, this.onPopupClose
);

Currently the popup that is rendered is autosized no matter what dimensions I use in the constructor. I've tried manually setting the autosizing attribute of the FramedCloud to false as well as manually adjusting the css styling for the popup without achieving the results I need.

I checked and found some similar issues in the OpenLayers 2.11 issues list, but I haven't found a workaround. Any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about popup