Please find the attached image as below, although I have changed the scalebarUnit to "Meter", it really just changes the unit from "km" to "m".
Here is the code
// create a print template for each choice
templates = arrayUtils.map(templateNames, function (ch) {
var plate = new PrintTemplate();
//plate.preserveScale = true; // Default = false
plate.layout = plate.label = ch;
plate.format = "JPG";
plate.layoutOptions = {
"legendLayers": legendLayers,
"scalebarUnit": "Meters"
};
plate.preserveScale = false;
return plate;
});
// create the print dijit
var printer = new Print({
"map": map,
"templates": templates,
url: xxx
}, dojo.byId("printButton"));
printer.startup();
Please advice, thanks.
Km:
Meter: