1 回答
TA贡献1871条经验 获得超13个赞
var location = new Microsoft.Maps.Location(@item.Latitude,@item.Longitude);
var pushpin = new Microsoft.Maps.Pushpin(location, { color: color });
pushpin.metadata = {
title: '@item.DtwId',
description: '@item.Desc',
franchiseNumber: 1
};
Microsoft.Maps.Events.addHandler(pushpin, 'click', pushpinClicked);
map.entities.push(pushpin);
function pushpinClicked(e) {
var infobox = new Microsoft.Maps.Infobox(e.target.getLocation(), {
title: e.target.metadata.title,
description: e.target.metadata.description,
visible: true
});
infobox.setMap(map);
- 1 回答
- 0 关注
- 168 浏览
添加回答
举报