[OpenLayers-Users] FramedCloud autoSize in IE6/7

Alessio Di Lorenzo alessio.dilorenzo at gmail.com
Fri Aug 29 05:57:39 EDT 2008


Hi list,

I'm working on an application using kml placemarks and showing the point 
description in a framed cloud popup.
It works fine in FF but not in IE (6 and 7).
The problem is that popups do not autosize properly and they look very 
"lengthened" on the y  direction and disproportionate...

You can view the example here:
http://62.94.37.215/Jadrantours


This is the part of the code that generates popups:

function onPopupClose(evt) {

        selectControl.unselect(selectedFeature);

}

function onFeatureSelect(feature) {

        selectedFeature = feature;

        var content = "<h3>"+feature.attributes.name + "</h3>" + feature.attributes.description;

        if (content.search("<script") != -1) {

                content = "Content contained Javascript! Escaped content below.<br />" + content.replace(/</g, "&lt;");

            }


        popup = new OpenLayers.Popup.FramedCloud("chicken",

                feature.geometry.getBounds().getCenterLonLat(),

                new OpenLayers.Size(100,100),

                content,

                null, true, onPopupClose);

        feature.popup = popup;

        map.addPopup(popup);

}

function onFeatureUnselect(feature) {

        map.removePopup(feature.popup);

        feature.popup.destroy();

        feature.popup = null;

}



Thank you in advance, alessio



More information about the Users mailing list