Reg: Legend problem in Print

1194
2
04-15-2014 08:04 PM
VikramS
Occasional Contributor
[ATTACH=CONFIG]33134[/ATTACH]
Hello all,
Above is the legend with 3 layers in it. Each of them is a polygon . But as you can see it has not generated the polygon fully . And also sometimes my basemap comes blank in print output but I can see the basemap in the viewer .. Can anyone tell me why this is happening . Thanks a bunch

Below is the attached code

    var PDFTitle = "test";
    var plate = new esri.tasks.PrintTemplate();
    plate.preserveScale = false;
    plate.layout = plate.label = "44x32";
    plate.format = "PDF";
    plate.layoutOptions = {
        "titleText": PDFTitle
    };

    var params = new esri.tasks.PrintParameters();
    params.map = map;
    params.template = plate;

    var printTask = new esri.tasks.PrintTask(printservice_url);

    printTask.execute(params, printResult, printError);

function printResult(result) {
    window.open(result.url, "_blank");
}

function printError(error) {
    alert(error);
}
0 Kudos
2 Replies
BradleySnider
New Contributor III
Vikram,

When using the PrintTemplate, be sure to include LegendLayer

As for the custom basemap, is the basemap reference a global variable?  I believe it should be.

I hope this helps.

Brad
0 Kudos
BrianFoley1
New Contributor II

Know this is an old post Vikram, did you ever resolve this ? I am running into the same problem.

0 Kudos