MapInput
Extends:
Used to create input control of the map.
Example:
var options = {
position: 'topleft',
onClick: function () {
console.log('onclick!!!');
console.log(this.value());
},
}
var input = new KQ.Control.MapInput(options);
input.setDropdownData([ 'A', 'B', 'C' ]);
input.setOnClick(function () {
console.log('new onclick!!!');
console.log(input.value());
console.log(input.dropdownValue());
});
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object) Constructor |
Method Summary
Public Methods | ||
public |
addToMapView(mapview: MapView): Null Add popup to mapview |
|
public |
Return the value of dropdown list |
|
public |
remove(): Null Removes the layer from the map it is currently active on. |
|
public |
setOnClick(callback: function(e: Object): null): Null Set on click event handle function |
|
public |
Return the value of input |
Public Constructors
public constructor(options: Object) source
Constructor
Params:
Name | Type | Attribute | Description |
options | Object | config params |
|
options.position | String | position of the mapinput |
|
options.iconType | String | icon type, default is 'search'.('check', 'custom', 'play', 'heart') |
|
options.inputWidth | Number | width of input control |
|
options.isHasDropdown | Boolean | if value is false, dropdown control will disappear |
|
options.dropdownWidth | Number | width of dropdown control |
|
options.dropdownMargin | Number | margin of input control and dropdown control |
|
options.onClick | Object | callback function rans when button is clicked |