Hello,
Is there a way to delete/remove 'MAP_ONLY' from the Printing Utility Service in Portal? I click the red X and save, but the 'MAP_ONLY' option is still available in the Web AppBuilder Print widget.
Thank you for your help in this matter.
William
Solved! Go to Solution.
Willaim,'
Sure in the Print widgets print.js file fin the _handlePrintInfo and make this change:
_handlePrintInfo: function(rData) {
if (!rData.isGPPrint) {
domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', 'none');
domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', 'none');
domStyle.set(this.advancedButtonDijit.domNode, 'display', 'none');
} else {
var data = rData.data;
domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', '');
domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', '');
domStyle.set(this.advancedButtonDijit.domNode, 'display', '');
var Layout_Template = array.filter(data.parameters, function(param) {
return param.name === "Layout_Template";
});
if (Layout_Template.length === 0) {
console.log("print service parameters name for templates must be \"Layout_Template\"");
return;
}
var layoutItems = array.map(Layout_Template[0].choiceList, function(item) {
//Remove the MAP_ONLY layout
if(item !== "MAP_ONLY"){
return {
label: item,
value: item
};
}
//end my change
});
Willaim,'
Sure in the Print widgets print.js file fin the _handlePrintInfo and make this change:
_handlePrintInfo: function(rData) {
if (!rData.isGPPrint) {
domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', 'none');
domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', 'none');
domStyle.set(this.advancedButtonDijit.domNode, 'display', 'none');
} else {
var data = rData.data;
domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', '');
domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', '');
domStyle.set(this.advancedButtonDijit.domNode, 'display', '');
var Layout_Template = array.filter(data.parameters, function(param) {
return param.name === "Layout_Template";
});
if (Layout_Template.length === 0) {
console.log("print service parameters name for templates must be \"Layout_Template\"");
return;
}
var layoutItems = array.map(Layout_Template[0].choiceList, function(item) {
//Remove the MAP_ONLY layout
if(item !== "MAP_ONLY"){
return {
label: item,
value: item
};
}
//end my change
});
... and without programming?
Is there any way to delete "MAP_ONLY" Layout when someone is just using configurable apps/web app builder in arc gis online?
There is not a way to do this without editing code unless you stand up your own print service and remove the map only option and then have your site point to that print service.
I even did that... publishing my own print service and disable "map_only" within service configuration. Unfortunately this had no effect. The map_only option seems to be very persistant. 😞
That should not be the case if your app is using your print service instead of the standard esri one.
This picture shows the service editor (german version) and I think the Layout-template parameter is the only where I could disable "map_only". As you can see I dischecked it.
Or is there any other point where I have to do it?
That is good but how are you telling your app to use this particular print service?
Publishing this Geoprocessing-Service on our Server, getting the REST-URL, adding the Service as an Element with stored credentials in ArcGIS Online and then adding the elements URL in the organizations utility print service. And the map_only is available in the utility services properties in AGOL despite I disabled it in the services properties. So I deleted it there too. And it still appears when using the print widget.
Hmm. All your steps sound correct. I would open a case with tech support.