Reference Source
public class | source

MapButtonBar

Map button bar class

See:

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)

Constructor

Method Summary

Public Methods
public

addToMapView(mapview: Object): Null

Add bar to mapview

public

Hide bar

public

remove(): Null

Remove bar

public

setPosition(position: String): Null

Set position of bar

public

Show bar

Public Constructors

public constructor(buttons: Array, options: Object) source

Constructor

Params:

NameTypeAttributeDescription
buttons Array

button array

options Object

init option

options.postion String
  • optional

postion of bar, such as 'topleft'...

Public Methods

public addToMapView(mapview: Object): Null source

Add bar to mapview

Params:

NameTypeAttributeDescription
mapview Object

mapview object

Return:

Null

public hide(): MapButtonBar source

Hide bar

Return:

MapButtonBar

public remove(): Null source

Remove bar

Return:

Null

public setPosition(position: String): Null source

Set position of bar

Params:

NameTypeAttributeDescription
position String

postion of bar, such as 'topleft'...

Return:

Null

public show(): MapButtonBar source

Show bar

Return:

MapButtonBar