zoukankan      html  css  js  c++  java
  • 地图打印仅地图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: {
                             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);
                    }
                }
  • 相关阅读:
    歌词:青春
    转载:只输了五元钱
    极静之渊

    低学翁
    心灵死化,何时巨变?
    无题

    意念
    爱之切
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/12147957.html
Copyright © 2011-2022 走看看