現在、私はbing mapsアプリケーションを開発中です。ユーザーがピンをクリックしたときに情報ボックスが表示されないようです。私はSDKに従っており、ほぼ同じでなければなりません。相続人は私が持っているもの:Bing Mapsの情報ボックス
// ***********************************
// Function creates a single pin
// and returns a reference to the pin
function createMapPin(latLong, sName) {
var pinImg = "imagespins/Good.png";
var pin = new Microsoft.Maps.Pushpin(latLong, {
icon: pinImg,
anchor: new Microsoft.Maps.Point(8, 8),
draggable: true,
width: 48,
height: 48
});
pin.title = sName;
pinInfobox = new Microsoft.Maps.Infobox(pin.getLocation(),
{ title: 'My Pushpin',
description: 'This pushpin is located at (0,0).',
visible: false,
offset: new Microsoft.Maps.Point(0, 15)
});
// Add handlers for the pushpin events
Microsoft.Maps.Events.addHandler(pin, 'click', displayInfobox);
// Hide the infobox when the map is moved.
Microsoft.Maps.Events.addHandler(map, 'viewchange', hideInfobox);
map.entities.push(pin);
map.entities.push(pinInfobox);
return pin;
}
function displayInfobox(e) {
pinInfobox.setOptions({ visible: true });
}
function hideInfobox(e) {
pinInfobox.setOptions({ visible: false });
}
ピンが作成され、正常にマップに追加し、ユーザーがピンをクリックするとそれだけで表示されているように見えるdoesntのdispayInfoBox方法が、メッセージボックスを入力します。
どのような提案も大きく反応します。ありがとう!
私の問題を完璧に解決してくれてありがとう、ありがとう! – Johnston