サイトの 1 つに bing マップを追加しています。プッシュピンとインフォボックスを表示できます。私が今直面している問題は、インフォボックスのコンテンツが白い箱から出てくることです。bing マップまたはその CSS のインフォボックスを自動調整する方法はありますか?
Jquery を使用して修正:
function displayInfobox(e) {
pinInfobox.setOptions({description: e.target.Description, visible:true, offset: new Microsoft.Maps.Point(0,4)});
pinInfobox.setLocation(e.target.getLocation());
map.setView({center:e.target.getLocation(),zoom:4});
adjustHeightInfobox();
}
function adjustHeightInfobox() {
var newHeight = jQuery(".infobox-info").height();
pinInfobox.setOptions({height:newHeight+15});
}