Hi all, I have added the print widget to my web map but right now it is always present there on the map in a big window and takes up a lot of space. I would like to move this widget to a button which when clicked opens the widget preferably like other buttons in the image. I am new to javascript so some details would be really helpful. I have only added this code from ArcGIS API with no div which already adds the widget to the map.
Solved! Go to Solution.
Check out the expand widget: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html
var print = new Print({
view: view
});
printExpand = new Expand({
expandIconClass: "esri-icon-printer",
expandTooltip: "Expand Print",
view: view,
content: print
});
view.ui.add(printExpand, "top-right");
;
Check out the expand widget: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html
var print = new Print({
view: view
});
printExpand = new Expand({
expandIconClass: "esri-icon-printer",
expandTooltip: "Expand Print",
view: view,
content: print
});
view.ui.add(printExpand, "top-right");
;
Works great. Thank you!!