2012-08-16 63 views
2

這是我的代碼如何戒菸滾動條的OpenLayers信息,彈出

Info.newInfoPopUp = function (obj) { 
    var table = createInfo(obj); 
    popup = new OpenLayers.Popup.FramedCloud(
    obj.name, 
    obj.lonlat, 
    new OpenLayers.Size(), 
    '<table class="info-table popup">' + table.html() + '</table>', 
    null, 
    true, 
    obj.closeCallback 
    ); 
    popup.minSize =new OpenLayers.Size(300,155); 
    popup.maxSize = new OpenLayers.Size(800,200); 
return popup; 
}; 

彈出有時會出現蒙山垂直滾動條

什麼想法?

回答

0

OpenLayers.Size類構造函數應該有參數寬度和高度。 試試這個:

var popup = new OpenLayers.Popup.FramedCloud(
    obj.name, 
    obj.lonlat, 
    new OpenLayers.Size(100,100), 
    tablHtml, 
    null, 
    true, 
    obj.closeCallback 
);