Select to view content in your preferred language

Print Widget Scale Bar Default Units

05-30-2018 02:06 PM
Status: Open
by Anonymous User
Not applicable


With the latest update, the print widget now comes with a drop-down choice for the units of the scale bar. This is great, but perhaps it would be even better if we could also set a default scale bar unit option, or select the options that the user should see?

For example, in New Zealand, we use Meters and Kilometers, and we don't use Feet and Miles. Right now, the tool defaults to Miles unless the user manually changes it.


I have been asked if I can make the scale bar that's on the map (not the print) be forced to stay in a unit type.  For example, I work for a city and we always want the scale bar to be in feet.  I don't know if this is possible but it would be nice.  At least the upgrade will allow it on the print, so that's something!


I'm using a custom Print Service in AGO and the scale bar has previously printed in FEET (same as the map templates are formatted). One user just pointed out that the maps are now printing in MILES as default, and I was wracking my brain until I spotted the comments above!

Please, let's return to honoring the scale bar measure in the map templates!


@alix vezina. What you are asking can be achieved if you are using developer edition of Webappbuilder. You just need to edit the print.html file in a text editor and make some changes. This file is located in widgets\print\templates folder. The line numbers that you need to make changes to is 131 through 134. Delete the lines that contain the units that you don't need. In your case it is 131 and 134. Your user will only see meters and kilometers in the print option. Also, if you change the line containing

<option value="Meters">${nls.unitsMeters}</option>


<option value="Meters" selected="selected">${nls.unitsMeters}</option>

then meters will be set as default units.

I just figured this out and it seems to be working on initial testing.

Print widget original config

Fig1(Out of the box configuration)

Print widget changed config

Fig2(Changed configuration)

by Anonymous User

Thank you very much for the detailed answer and steps Anish!

I am aware of the possibilities with WAB dev edition of course, but most organisations use the out-of-the-box, configurable, ArcGIS  WAB edition, and are not necessarily willing to undertake the process of hosting and maintaining their own applications and server. Therefore, extending default configuration capabilities for ArcGIS  WAB will always be much appreciated for these users.


This would be a great enhancement for org's that have tight budgets and do not have the ability to setup and maintain a development environment.  This type of configuration was available with the FlexViewer apps, so it feels like this is a step backwards in the WebAppBuilder environment.  It would also be handy to be able to limit the custom print templates that are available in each application which was available in FlexViewer configuration.  A workaround would be to setup individual print services that are hooked to specific print templates, but then you have a less efficient ArcGIS Server environment.


This is a critical update that needs to be added ASAP. While it is nice to have the new option, we always default to feet for scales and rarely use miles. In many other WAB widgets you can set similar defaults and also the options available for the end user (see Measure tool).


Sounds like a great idea! A shame this hasn't been addressed yet - original post is from mid-2018. We use metric units only. My scale bar is KM, yet the Print Widget default setting is Miles... makes no sense!

The default should be configurable. Allowing users to change this at the time of printing is good, so don't change that. Add a few other settings as well; Default extent, Default DPI, …


I should also add that our Organization default units are metric - yet the Print widget defaults to Miles. This makes no sense!


Yep - this is really poorly implemented. I have a template created in Pro with a scalebar that has units set to meters. This is published via a print service.

The default in the print widget advanced section appears to be "miles" and if this is selected the scalebar on the resulting print is in km!

The widget definitely needs the option to set the default units (and other defaults) so that we don't have to tell every user to manually set them each time they print. This isn't a seldom used widget either, it is used by many, many organisations I'm sure and any organisation that doesn't use miles will be affected!


If ESRI is pushing for us to migrate from legacy Story Maps and WAB to Experience, these small yet critical details are vital for end user experience. It's a shame this hasn't even been looked at in five years since this post was created, and as someone else mentioned above, functionality is available in other widgets! Only 9% of countries worldwide use miles...the default should be m or km anyway!