Right-click the map window and write the following javascript code into a separate script. You can directly introduce the html page of the map window:
Require (["dojo/ready", "dijit/Menu", "dijit/MenuItem", "dijit/CheckedMenuItem", "dijit/MenuSeparator", "dijit/PopupMenuItem"], function (ready, Menu, MenuItem, CheckedMenuItem, MenuSeparator, PopupMenuItem ){
Ready (function (){
Var pMenu;
PMenu = new Menu ({
TargetNodeIds: ["map"]
});
PMenu. addChild (new MenuItem ({
Label: "zoom in ",
OnClick: function () {alert ('zoomed in ')}
}));
PMenu. addChild (new MenuItem ({
Label: "zoom out ",
OnClick: function () {alert ('downsize ')}
}));
// PMenu. addChild (new MenuItem ({
// Label: "Menu Item With an icon ",
// IconClass: "dijitEditorIcon dijitEditorIconCut ",
// OnClick: function () {alert ('I was clicked ')}
//}));
// PMenu. addChild (new CheckedMenuItem ({
// Label: "checkable menu item"
//}));
// PMenu. addChild (new MenuSeparator ());
// Var pSubMenu = new Menu ();
// PSubMenu. addChild (new MenuItem ({
// Label: "Submenu item"
//}));
// PSubMenu. addChild (new MenuItem ({
// Label: "Submenu item"
//}));
// PMenu. addChild (new PopupMenuItem ({
// Label: "Submenu ",
// Popup: pSubMenu
//}));
PMenu. startup ();
});
});