MapButton
地图按钮类
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');
Constructor Summary
Public Constructor | ||
public |
构造函数 |
Method Summary
Public Methods | ||
public |
addToMapView(mapview: Object, position: String): Null 添加按钮到mapview |
|
public |
按钮启用的状态 |
|
public |
隐藏按钮 |
|
public |
remove(): Null 移除按钮 |
|
public |
setEnabled(flag: Boolean): Null 设置按钮启用状态 |
|
public |
setPosition(position: String): Null 设置按钮的位置 |
|
public |
设置按钮标题 |
|
public |
显示按钮 |
Public Constructors
Public Methods
public setEnabled(flag: Boolean): Null source
设置按钮启用状态
Params:
Name | Type | Attribute | Description |
flag | Boolean | 按钮是否启用 |
Return:
Null |
public setPosition(position: String): Null source
设置按钮的位置
Params:
Name | Type | Attribute | Description |
position | String | 按钮的位置,例如“topleft” |
Return:
Null |