Scale

Scale

比例尺

Constructor

new Scale(options)

Parameters:
Name Type Description
options *
Properties
Name Type Attributes Default Description
position String <optional>
'leftBottom'

位置

offset Array <optional>
[20, 50]

位置

maxLength Number <optional>
80

最大宽度

color String <optional>
'black'

颜色

lineWidth Number <optional>
2

线宽

height Number <optional>
5

高度

font String <optional>
'12px Arial'

字体

onUpdate function <optional>

更新回调

Extends

Methods

addTo(map) → {this}

描述:
  • 添加到地图

Overrides:
Parameters:
Name Type Description
map Map

地图实例

Returns:
Type
this

discard() → {this}

描述:
  • 从地图移除

Overrides:
Returns:
Type
this