MapButtonBar
按钮条类
Example:
var button0 = new KQ.Control.MapButton('fa fa-globe fa-lg', function (btn, map) {
console.log('button 0 clicked!');
}, 'Press Button 0');
var button1 = new KQ.Control.MapButton('fa fa-bug fa-lg', function (btn, map) {
console.log('button 1 clicked!');
}, 'Press Button 1');
let bar = new KQ.Control.MapButtonBar([ button0, button1 ], { position: 'topright' });
bar.addTo(map);
Constructor Summary
| Public Constructor | ||
| public |
constructor(buttons: Array, options: Object) 构造函数 |
|
Method Summary
| Public Methods | ||
| public |
addToMapView(mapview: Object): Null 添加按钮条到mapview |
|
| public |
hide(): MapButtonBar 隐藏按钮条 |
|
| public |
remove(): Null 移除按钮条 |
|
| public |
setAttribute(key: *, value: *) |
|
| public |
setPosition(position: String): Null 设置按钮条的位置 |
|
| public |
show(): MapButtonBar 显示按钮条 |
|
Public Constructors
Public Methods
public addToMapView(mapview: Object): Null source
添加按钮条到mapview
Params:
| Name | Type | Attribute | Description |
| mapview | Object | mapview对象 |
Return:
| Null |
public setAttribute(key: *, value: *) source
Params:
| Name | Type | Attribute | Description |
| key | * | ||
| value | * |
Reference
Source