Bing Maps V7 Context Menu

亡梦爱人 提交于 2019-12-04 18:29:19
Johann

Question number 1:

var pushpin= new Microsoft.Maps.Pushpin(map.getCenter(), null); 
pushpinClick= Microsoft.Maps.Events.addHandler(pushpin, 'rightclick', displayEventInfo);  
map.entities.push(pushpin); 

function displayEventInfo(e){
    var pushpin = e.target;
    var infoboxOptions = {width :200, height :100, showCloseButton: true, zIndex: 0, offset:new Microsoft.Maps.Point(10,0), showPointer: true}; 
    var defaultInfobox = new Microsoft.Maps.Infobox(pushpin.getLocation(), infoboxOptions );    
    map.entities.push(defaultInfobox);
    defaultInfobox.setHtmlContent('html content goes here!'); 
}

Question number 2:

<body oncontextmenu="return false">
...
</body>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!