Skip To Content
ArcGIS Developer
Dashboard

Scalebar

The Scalebar widget displays a scale bar on the map or in a specified HTML node. The widget respects various coordinate systems and displays units in English or metric values. When working with Web Mercator or geographic coordinate systems, the Scalebar widget takes into account projection distortion and dynamically adjusts the scale bar appropriately.

Configurable attributes

The following table describes the configurable attributes of the Scalebar widget.

AttributeDescription

scalebar

An ArcGIS API for JavaScript object. See the parameters for the Scalebar constructor.

Example

{
  "scalebar": {
    "scalebarStyle": "line",
    "scalebarUnit": "dual"
  }
}