地图打印仅地图4X

            var fullmap = dom.byId("Print");
            fullmap.onclick = function () {
                var printTask = new PrintTask({
                    url: "http://localhost:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
                });
                var template = new PrintTemplate({
                    exportOptions: {
                        width: 950,
                        height: 850,
                        dpi: 96
                    },
                    format: "pdf"
                    //layout: "a3-landscape",
                    //layoutOptions: {
                    //    titleText: "biaoti",
                    //    authorText: "leejianghua"
                    //},
                    //preserveScale: false
                });
                var params = new PrintParameters({
                    view: view,
                    template: template
                });
                printTask.execute(params).then(result, errorResult);
                function result(evt) {
                    console.log(evt);
                    window.open(evt.url, "_blank");  //在新的标签页打开打印连接
                }
                function errorResult(err) {
                    console.log(err);
                }
            }

 

上一篇:Android Studio 4x版本搜索使用在线依赖包


下一篇:PCS7 DCS 水泥粉磨程序