MapButton
Map button class
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 |
Constructor |
Method Summary
Public Methods | ||
public |
addToMapView(mapview: Object, position: String): Null Add button to mapview |
|
public |
Button enabled state |
|
public |
Hide button |
|
public |
remove(): Null Remove button |
|
public |
setEnabled(flag: Boolean): Null Set the button enabled state |
|
public |
setPosition(position: String): Null Set position of button |
|
public |
Set button title |
|
public |
Show button |
Public Constructors
Public Methods
public addToMapView(mapview: Object, position: String): Null source
Add button to mapview
Return:
Null |
public setEnabled(flag: Boolean): Null source
Set the button enabled state
Params:
Name | Type | Attribute | Description |
flag | Boolean | is button enabled |
Return:
Null |
public setPosition(position: String): Null source
Set position of button
Params:
Name | Type | Attribute | Description |
position | String | postion of button, such as 'topleft'... |
Return:
Null |