10.1 Print Tiled Map service with PreserveScale

492
0
10-03-2013 10:54 AM
YamunadeviRathinasamy
New Contributor II
I am using tiled Map service and few dynamic map service layers in my Map. I am using 10.1 priting task.

                //Set up print stuff
                var printTask = new esriMapPrinttask(myPrintServiceURL);
                var params = new esriMapPrintparameter();
                var template = new esriMapPrinttemplate();
             
                template.layout = "MAP_ONLY";
                template.format = "PDF";
             
                template.layoutOptions = {
                    "authorText": "Made by:  me",
                    "copyrightText": "me",
                    "titleText": "MyTile"
                };
               
                params.map = this.Map;
                template.exportOptions = {
                    width: this.Map.width,
                    height: this.Map.height,
                    dpi: 96
                };              
                template.preserveScale = true;
                params.template = template;
                printTask.execute(params, lang.hitch(this,this.printResult), lang.hitch(this,this.printError));
            }

Print result displays only my dynamic map service. and no tiled.
I removed all dynamic and only tested with my tiled map service which prints nothing.
If I set " template.preserveScale = false" everything works fine. I can see my tiled and dynamic services on print result.
0 Kudos
0 Replies