JS 百度地图-右键菜单
/*-----------------标注右键删除-------------------------*/ var markerMenu = new BMap.ContextMenu(); markerMenu.addItem(new BMap.MenuItem('删除标注 ', function () { map.removeOverlay(marker); })) marker.addContextMenu(markerMenu);
/*-----------------标注右键删除-------------------------*/ var markerMenu = new BMap.ContextMenu(); markerMenu.addItem(new BMap.MenuItem('删除标注 ', function () { map.removeOverlay(marker); })) marker.addContextMenu(markerMenu);