Dear users,
we got "the first step" print with ArcGIS Maps SDK 4.27 for JavaScript succesfully. But I wonder:
a) Is it possible to change the scalebar, that the units are only shown in kilometers (not in miles)?
b) Is it possible to put an own image (logo) into the printout?
c) Is it possible to set a text in the printout, that has some "breaks" (like html-<br> or \n)?
It might be that we have to create complete own and new templates. Could anybody give some hints, how this can be done?
This is the code so far:
const print = new Print({
view: view,
printServiceUrl:
"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",
allowedLayouts: ["a3-landscape", "a3-portrait","a4-landscape", "a4-portrait" ],
allowedFormats: ["jpg", "png8", "png32","pdf"],
templateOptions: {
title: "Datenausdruck",
author: "Part 1, Part 2, Part 3",
copyright: "",
legendEnabled: false
}
});
view.ui.add(print, {
position: "top-right"
});
Solved! Go to Solution.
Hey Kai,
Unfortunately I do not beleive there is a way to adjust the print layouts unless you have your own print service hosted on ArcGIS Server or ArcGIS Enterprise. From this you could change the print utiltiy URL and refer to Layout templates hosted via this.
The documentation to do this can be found here.
Hope that helps,
David
Thank you very much, that answer is helpfull for us. We contacted ESRI now to get (eventually) an Enterprise-Licence...
Hey Kai,
Unfortunately I do not beleive there is a way to adjust the print layouts unless you have your own print service hosted on ArcGIS Server or ArcGIS Enterprise. From this you could change the print utiltiy URL and refer to Layout templates hosted via this.
The documentation to do this can be found here.
Hope that helps,
David
Thank you very much, that answer is helpfull for us. We contacted ESRI now to get (eventually) an Enterprise-Licence...
In response to question c) Is it possible to set a text in the printout, that has some "breaks" (like html-<br> or \n)?
Yes, using the copyright property you can include any text, I use to add a disclamer as well as the copyright information. For example:
templateOptions: {
title: "WSDOT Monuments and NGS Stations",
copyright: "DISCLAIMER: This map is for display purposes only and is not intended for any legal representation. WSDOT Monument Map Engine @ 2024";
northArrowEnabled: true,
legendEnabled: true
}