Class: ScaleLine

webgis4u/ol/control/ScaleLine~ScaleLine()

new ScaleLine()

Source:

Members

canvas_ :HTMLCanvasElement|null

Stores the canvas
Type:
  • HTMLCanvasElement | null
Source:

minWidth_ :number

Type:
  • number
Source:

SHOW_SCALE :boolean

If `true`, the scale is shown
Type:
  • boolean
Source:

Methods

export()

Gets the scale line as base 64 encoded image.
Source:
Returns:
The scale line as base 64 encoded image.

getCanvas() → {HTMLCanvasElement|null}

Source:
Returns:
The canvas element
Type
HTMLCanvasElement | null

getUnits() → {ScaleLineUnitEnum|undefined}

Source:
Returns:
The units to use in the scale line.
Type
ScaleLineUnitEnum | undefined

setMap()

Source:

setUnits(value)

Parameters:
Name Type Description
value ScaleLineUnitEnum The units to use in the scale line.
Source:

updateScale(options)

Update the scale element
Parameters:
Name Type Description
options object The options
Properties
Name Type Description
size number The width.
resolution string The resolution
showScale boolean If `true` the resolution will be shown
Source: