Classes
Type Definitions
- 
    
Options{Object}
 - 
Properties:
Name Type Argument Default Description classNamestring <optional> 
CSS class name. The default is
ol-scale-barwhen configured withbar: true. Otherwise the default isol-scale-line.minWidthnumber <optional> 
64 Minimum width in pixels at the OGC default dpi. The width will be adjusted to match the dpi used.
maxWidthnumber <optional> 
Maximum width in pixels at the OGC default dpi. The width will be adjusted to match the dpi used.
renderfunction <optional> 
Function called when the control should be re-rendered. This is called in a
requestAnimationFramecallback.targetHTMLElement | string <optional> 
Specify a target if you want the control to be rendered outside of the map's viewport.
unitsUnits <optional> 
'metric' Units.
barboolean <optional> 
false Render scalebars instead of a line.
stepsnumber <optional> 
4 Number of steps the scalebar should use. Use even numbers for best results. Only applies when
baristrue.textboolean <optional> 
false Render the text scale above of the scalebar. Only applies when
baristrue.dpinumber | undefined <optional> 
dpi of output device such as printer. Only applies when
baristrue. If undefined the OGC default screen pixel size of 0.28mm will be assumed. - 
    
Units{'degrees'} {'imperial'} {'nautical'} {'metric'} {'us'}
 - 
    
Units for the scale line.