This tutorial describes how to print with the geodocument service.
result:
Read more detailed information in the referenced API documentation:
geoDocumentService API reference
To use the function as seen above, use the following code.
// Get the feature attributes:
window.addEventListener(
"message",
(evt) => {
const functionName = evt.data.functionName
if(!functionName){
return;
}
switch (functionName){
case "geoDocumentService": {
// Your code routine
break;
}
default:{}
}
},
false
);
// send Reset request
const integrationElement = document.getElementById('mapIntegrationElement').contentWindow
if(integrationElement){
integrationElement.postMessage({functionName: functionName, detail: detail}, "*")
}
printParameter = {
"service": "print",
"layout": "A4 Hoch",
"title": "Titel",
"description": "Beschreibung"
}
postEvent("geoDocumentService", printParameter)