new EasyControl(controlOptions, options)
控件组合类
Parameters:
| Name | Type | Description |
|---|---|---|
controlOptions |
Array.<Object> | 控件配置项 |
options |
Object | 配置项 |
- Source:
Methods
addMapEventListener(id, eventsOn, handler, context) → {*}
事件绑定,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
Returns:
返回handler用于事件移除
- Type
- *
addMapEventListenerOnce(id, eventTypes, handler, context)
单次事件绑定,调用一次后移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
addTo(easyMap) → {EasyControl}
添加到地图
Parameters:
| Name | Type | Description |
|---|---|---|
easyMap |
EasyMap | 地图对象 |
- Source:
Returns:
- Type
- EasyControl
cancelFullScreen(map)
地图取消全屏
Parameters:
| Name | Type | Description |
|---|---|---|
map |
* |
- Source:
hide(ids)
隐藏控件
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
ids |
String | Array.<String> | null | 控件id,不传表示全部 |
- Source:
on(id, eventsOn, handler, context) → {any}
事件绑定
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
Returns:
返回handler用于事件移除
- Type
- any
once(id, eventTypes, handler, context)
单次事件绑定,调用一次后移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
removeMapEventListener(id, eventsOff, handler, context)
事件移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
requestFullScreen(map)
地图全屏
Parameters:
| Name | Type | Description |
|---|---|---|
map |
* |
- Source:
show(ids)
显示控件
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
ids |
String | Array.<String> | null | 控件id,不传表示全部 |
- Source:
un(id, eventsOff, handler, context)
事件移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
id |
String | 控件id | |
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source: