AnsweredAssumed Answered

Save screen Shot as Image

Question asked by sokay37 on Dec 23, 2015
Latest reply on Dec 23, 2015 by rscheitlin

this Code

 

 

 

function Print() {

    debugger

 

 

    require(["esri/map", "esri/config", "esri/geometry/Extent", "esri/layers/ArcGISTiledMapServiceLayer",

            "esri/tasks/PrintTask", "esri/tasks/PrintTemplate", "esri/tasks/PrintParameters"],

     function (Map,esriConfig, Extent, ArcGISTiledMapServiceLayer, PrintTask, PrintTemplate, PrintParameters) {

        

      

         esriConfig.defaults.io.alwaysUseProxy = false;

         var template = new PrintTemplate();

         template.exportOptions = {

             width: 500,

             height: 400,

             dpi: 96

         };

         template.format = "JPG";

         template.layout = "MAP_ONLY";

         template.preserveScale = false;

         var params = new PrintParameters();

         params.map = layerMap;

         params.template = template;

         var printTask = new PrintTask("http://maps.decaturil.gov/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task");

         printTask.execute(params, function (imagePath) {

             window.open(imagePath.url);

             debugger;

            

         }, function (err) {

             console.log(err);

         });

     });

}

 

 

this method not run and idea

Outcomes