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:
Any idea?
I tried changing to kilometers and meters here: JS Bin - Collaborative JavaScript Debugging
and the scalebar output changes. Have you ran your app in debug mode perhaps in the Dev tools in Google Chrome?
Any solution to this yet?
On my own site (jsapi 3.7), changing scalebarUnit from Miles to Feet only changes the unit text- what was 0.5 miles now reads 0.5 feet. What I'd like to do is display in feet when zoomed in and miles when zoomed out by passing a variable to scalebarUnit.
Thanks.
Not yet. The problem is still exist. For work around (seems stupid), I told my client that there are some bugs in ArcGIS Javascript API, this issue may be fixed in the future......