I use Bing Maps Ajax V7. I want on right click to get an infobox and show my links inside.
function GetMap(){ // Initialize the map map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),{credentials:""}); attachrightclick = Microsoft.Maps.Events.addHandler(map, 'rightclick',showPopupMenu); } function showPopupMenu(e){ var latlong = new Microsoft.Maps.Location(e.getY(),e.getX()); var defaultInfobox = new Microsoft.Maps.Infobox(latlong, {title: '<div>My Pushpin<div>', visible: true} ); map.entities.push(defaultInfobox); }
Infobox added but unfortunately have no sense with to point I clicks... I adds on other latlon...
Have a anyone an idea:
1)How to make info window load on position where I right click. 2)Disable default right click of browser so only shows info box and not and right click menu
Thanks a lot.