aspect.after(printMapTool._printButton, "openDropDown", function() { $('.dijitPopup.dijitMenuPopup').each(function() { $('#' + this.id).css('z-index', 2000); }); });
/**************************** Start Print Functions *****************************/ registry.byId("nav_print").on("click", function () { $("#printform").show(); } ); function createPrintDijit(printTitle, pageSize, pageOr) { var printURL = "http://192.168.20.14:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task"; // create an array of objects that will be used to create print templates var layouts = [ { "name": pageSize +" "+ pageOr, "label": "Landscape (PDF)", "format": "pdf", "options": { "legendLayers": [], // empty array means no legend //"scalebarUnit": "Feet", "titleText": printTitle } } ]; // create the print templates, could also use dojo.map var templates = []; dojo.forEach(layouts, function(lo) { var t = new PrintTemplate(); t.layout = lo.name; t.label = lo.label; t.format = lo.format; t.layoutOptions = lo.options templates.push(t); }); printer = new Print({ "map": map, "templates": templates, url: printURL, }, dojo.byId("printMap")); printer.startup(); } // Create default print widget createPrintDijit("PWSB Emap", "Tabloid", "Landscape"); // Re-Create the print button when any of the form fields change registry.byId("pagetitle").on("change", function () { pageSize = registry.byId("pagesize").get("value"); pageOrient = registry.byId("pageor").get("value"); pageTitle = registry.byId("pagetitle").get("value"); printer.destroy(); console.log(pageTitle+" "+pageSize+" "+pageOrient); createPrintDijit(pageTitle, pageSize, pageOrient); } ); registry.byId("pagesize").on("change", function () { pageSize = registry.byId("pagesize").get("value"); pageOrient = registry.byId("pageor").get("value"); pageTitle = registry.byId("pagetitle").get("value"); printer.destroy(); console.log(pageTitle+" "+pageSize+" "+pageOrient); createPrintDijit(pageTitle, pageSize, pageOrient); } ); registry.byId("pageor").on("change", function () { pageSize = registry.byId("pagesize").get("value"); pageOrient = registry.byId("pageor").get("value"); pageTitle = registry.byId("pagetitle").get("value"); printer.destroy(); //createPrintDijit(pageTitle, pageSize, pageOrient); } ); /***************************** End Print Functions ******************************/
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.