<layouttemplates visible="false">MAP_ONLY</layouttemplates>
private function initLayoutTemplates(serviceInfo:PrintServiceInfo):void { var layoutTemplatesVisibility:Boolean = true; layoutTemplatesFI.label = configXML.labels.layouttemplateslabel[0] || hostBaseWidget.getDefaultString("printLayoutTemplatesLabel"); var layoutTemplates:IList = serviceInfo.layoutTemplates; //Go through the layouttemplates and remove the ones listed as removetemplate var removelist:Array = []; for each (var removeXML:XML in configXML.layouttemplates.removetemplate){ removelist.push(removeXML.toString()); } if (removelist.length > 0){ var ltLen:int = layoutTemplates.length; var layoutTemplate:String; for (var rt:int = ltLen - 1; rt >= 0; rt--){ layoutTemplate = layoutTemplates.getItemAt(rt) as String; if (removelist.indexOf(layoutTemplate) > -1){ layoutTemplates.removeItemAt(rt); } } } if (configXML.layouttemplates[0]) { printParameters.layoutTemplate = configXML.layouttemplates.@defaultvalue[0] || configXML.layouttemplates[0]; layoutTemplatesVisibility = configXML.layouttemplates[0].@visible[0] != "false"; } shouldShowTemplateOptions = layoutTemplatesVisibility && (layoutTemplates && layoutTemplates.length > 1); var shouldUseServiceInfoDefault:Boolean = (!printParameters.layoutTemplate && serviceInfo.defaultLayoutTemplate); if (shouldUseServiceInfoDefault) { layoutTemplatesDDL.selectedItem = serviceInfo.defaultLayoutTemplate; } }
<configuration> <!-- change this URL to your own Export Web Map Task (requires ArcGIS Server 10.1), or just remove the taskurl tag to get quick printing --> <taskurl>http://servicesbeta2.esri.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task</taskurl> <layouttemplates> <removetemplate>MAP_ONLY</removetemplate> </layouttemplates> </configuration>
Shanning, Yep that is what: <layouttemplates visible="false">MAP_ONLY</layouttemplates> means.
I have posted this before and have not got ANY response by ESRI...HELLO...Where are you ESRI?
Shanning, It goes in the PrintWidget.xml
[Bindable] public var layoutList:ArrayCollection = new ArrayCollection(["A3 Landscape","A3 Portrait","A4 Landscape","A4 Portrait","Letter ANSI A Landscape","Letter ANSI A Portrait","Tabloid ANSI B Landscape","Tabloid ANSI B Portrait"]); <s:DropDownList id="layoutTemplatesDDL" width="175" dataProvider="{layoutList}" requireSelection="true"/> <!--printTask.getServiceInfoLastResult.layoutTemplates-->
<s:DropDownList id="layoutTemplatesDDL" width="175" dataProvider="{Your own iList}" requireSelection="true"/>
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.