[OpenLayers-Users] FramedCloud autoSize in IE6/7
Erik Uzureau
euzuro at gmail.com
Thu Sep 4 18:13:00 EDT 2008
I have loaded your example and it looks like the extra vertical
spacing is due to a trailing <BR> in
the popup content's html code.
Erik
On Fri, Aug 29, 2008 at 4:57 AM, Alessio Di Lorenzo
<alessio.dilorenzo at gmail.com> wrote:
> 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, "<");
>
> }
>
>
> 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
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list