我正在嘗試添加多個圖釘與單獨的信息框。這意味着每個圖釘將擁有自己的信息框和自己的信息。 有一個loop.inside是Bing地圖中信息框的多個圖釘
latlng = new Microsoft.Maps.Location(latitude[pointerCount], longtitue[pointerCount]);
MarkingLocation[pointerCount] = new Microsoft.Maps.Pushpin(latlng, {icon:"marker2.ico", height:50, width:50, anchor:new Microsoft.Maps.Point(0,50)});
myInfobox = new Microsoft.Maps.Infobox(latlng, myinfoboxOption);
Microsoft.Maps.Events.addHandler(MarkingLocation[pointerCount], 'click', function() {myInfobox.setOptions({ visible:true });});
map.entities.push(MarkingLocation[pointerCount]);
map.entities.push(myInfobox);
問題是,它僅顯示爲每個圖釘的最後一個信息框。假設我在法國,德國,美國的Londom有4個圖釘。現在無論我點擊了哪個針,它只是顯示美國信息框在美國圖釘。請問任何人都可以幫助,我已經失蹤.........
還有一件事,可以任何人都應該展示如何在信息框中使用htmlContent。我試着將它設置thrugh選項,但它不是迴環......
myinfoboxoption = {width:300,
height: 100,
title: str_loc,
htmlContent: htmlc,
showPointer: false,
offset: new Microsoft.Maps.Point(-100,0)};
請幫助........