I'm trying to create a custom print tool. I'm pretty close to achieving this. I hit a road block and need some help. This is long shot and can't seem to find to much info on this topic with JSAPI 4x. There is some discussion on this with JSAPI 3x.
I'm trying to create the JSON for the webmap. Reading the documentation it says it's easy to do but I see nothing about it, which is frustrating. I've seen people talk about some hidden methods called
$('#locationSel').html(output.join(''))
const printTask = new PrintTask({
url: printUrl
});
const template = new PrintTemplate({
format: "pdf",
exportOptions: {
dpi: 300
},
layout: "a4-portrait",
layoutOptions: {
titleText: "Warren Wilson College Trees",
authorText: "Sam"
}
});
const params = new PrintParameters({
template: template,
view: view,
});
console.log(printTask)
printTask.execute(params).then(printResult);
var Web_Map_as_JSON = printTask._getPrintDefinition(webmap,params);