Simple Scale Bar Control
This sample shows how to create a custom simple scale bar control that can be added to the map. This sample is loading two scale bars, one with units set to imperial and the other to metric.
This control has two options;
units - The distance units of the scale bar. Supported values: imperial, metric, meters, kilometers, yards, feet, miles, nauticalMiles. If set to imperial or metric, the values will change between mi/ft and km/m depending on zoom level. Default: imperial
maxBarLength - The maximum length of the scale bar in pixels. Default: 100