new EasyDrawTool(options)
绘制工具类
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | 配置项 |
- Source:
Methods
addMapEventListener(eventsOn, handler, context) → {*}
事件绑定,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
Returns:
返回handler用于事件移除
- Type
- *
addMapEventListenerOnce(eventTypes, handler, context)
单次事件绑定,调用一次后移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
addTo(easyMap) → {EasyDrawTool}
添加到地图
Parameters:
| Name | Type | Description |
|---|---|---|
easyMap |
EasyMap | 地图对象 |
- Source:
Returns:
- Type
- EasyDrawTool
disable() → {EasyDrawTool}
禁用绘图工具
- Source:
Returns:
- Type
- EasyDrawTool
drawCircleFeature()
绘制圆
- Source:
drawLineStringFeature()
绘制线
- Source:
drawPointFeature()
绘制点
- Source:
drawPolygonFeature()
绘制多边形
- Source:
drawRectangleFeature()
绘制矩形
- Source:
enable() → {EasyDrawTool}
启用绘图工具
- Source:
Returns:
- Type
- EasyDrawTool
on(eventsOn, handler, context) → {*}
事件绑定
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
Returns:
返回handler用于事件移除
- Type
- *
once(eventTypes, handler, context)
单次事件绑定,调用一次后移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
removeMapEventListener(eventsOff, handler, context)
事件移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
un(eventsOff, handler, context)
事件移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source: