OpenLayers ScaleBar Example

Demonstrate a map with a scale bar.

Set properties for the scale bar with the options argument for the constructor. Scale bar style (including bar color/graphics) is controlled with CSS. See the default style.css for scale bar related selectors. To use CSS with the scale bar, add your stylesheet explicitly to your page with a link tag (as with this page).
display system