Module: ol/control/ScaleLine
This documentation is for OpenLayers v
5.3.2. The
latest is v
.
Classes
- ScaleLine
Members
-
-
Units for the scale line. Supported values are 'degrees'
, 'imperial'
,
'nautical'
, 'metric'
, 'us'
.
Properties:
Name |
Type |
Default |
Description |
DEGREES
|
string
|
degrees
|
|
IMPERIAL
|
string
|
imperial
|
|
NAUTICAL
|
string
|
nautical
|
|
METRIC
|
string
|
metric
|
|
US
|
string
|
us
|
|
Methods
-
module:ol/control/ScaleLine.render(mapEvent)
control/ScaleLine.js, line 286
-
Update the scale line element.
This:
Type Definitions
-
-
Properties:
Name |
Type |
Argument |
Default |
Description |
className
|
string
|
<optional>
|
'ol-scale-line'
|
CSS Class name. |
minWidth
|
number
|
<optional>
|
64
|
Minimum width in pixels. |
render
|
function
|
<optional>
|
|
Function called when the control
should be re-rendered. This is called in a requestAnimationFrame callback. |
target
|
HTMLElement
|
string
|
<optional>
|
|
Specify a target if you want the control
to be rendered outside of the map's viewport. |
units
|
Units
|
string
|
<optional>
|
'metric'
|
Units. |