2

I have an openlayers app with a FramedCloud popup. The popup has a lot of lines of data, so scrolling is needed to get to the bottom. All works well on my pc with Firefox. However, out in the field with an iPhone or Android (running Chrome), I get no side scroll bar, so cannot get down to the end of the form.

Here's some popup code that gives the problem:

function onFeatureSelect(event) {

    var feature = event.feature;

    var content = "<strong>" + feature.attributes.art.value + 
         "</strong> (Id: " + feature.attributes.trädnummer.value + 
         ")<br><strong>Risk:</strong> " + feature.attributes.risk.value +
         "<br>" + feature.attributes.anmärkningar.value + 
         "<br><strong>Åtgärd: </strong>" + 
         feature.attributes.rekommendationer.value;
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content += "<br><br><br>A string";
    content +=  '<br><input type="submit" value="Spara"">';

    popup = new OpenLayers.Popup.FramedCloud(
        "chicken",
        feature.geometry.getBounds().getCenterLonLat(),
        null,
        content,
        null, 
        true, 
        onPopupClose);

    feature.popup = popup;

    map.addPopup(popup);
}

Does anyone have a solution to this?

Thanks

Mini

1

In your FramedCloud constructor, you may need to pass a real size (not null). Try changing the third parameter to something like

new OpenLayers.Size(100,100)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.