Methods
addGeometry(geometries)
添加图形
Parameters:
| Name | Type | Description |
|---|---|---|
geometries |
Geom | Array.<Geom> | 图形或图形数组 |
- Source:
addMapEventListener(eventsOn, handler, context)
事件绑定,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
addMapEventListenerOnce(eventTypes, handler, context)
单次事件绑定,调用一次后移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
addTo(easyMap)
把图层添加到地图
Parameters:
| Name | Type | Description |
|---|---|---|
easyMap |
EasyMap | 目标地图 |
- Source:
config(conf, confValue)
获取或设置options
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
conf |
String | Object | null | 配置,不传时,表示获取所有options;传字符串时与confValue搭配使用,把名为conf的配置项设置成congValue;传对象时内容为要设置的配置项的键值对,可设置多个; |
confValue |
* | null |
- Source:
getGeometries(filter, context) → {*}
获取图形,可以加过滤条件
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
filter |
function | null | 过滤方法 |
context |
Object | null | 上下文 |
- Source:
Returns:
- Type
- *
getGeometryById(id) → {*}
根据id获取图形
Parameters:
| Name | Type | Description |
|---|---|---|
id |
String | 图形id |
- Source:
Returns:
- Type
- *
getMap() → {EasyMap}
获取图层所在地图
- Source:
Returns:
- Type
- EasyMap
hide() → {*}
隐藏图层
- Source:
Returns:
- Type
- *
on(eventsOn, handler, context)
事件绑定
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOn |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
once(eventTypes, handler, context)
单次事件绑定,调用一次后移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventTypes |
String | 要注册的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
remove() → {EasyLayer}
从地图上删除图层本身
- Source:
Returns:
- Type
- EasyLayer
removeMapEventListener(eventsOff, handler, context)
事件移除,别名
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source:
show() → {*}
显示图层
- Source:
Returns:
- Type
- *
un(eventsOff, handler, context)
事件移除
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
eventsOff |
String | 要移除的事件类型 | |
handler |
* | 要调用的处理函数 | |
context |
* | null | 处理程序的上下文 |
- Source: