GroupGraphic
大约 1 分钟
GroupGraphic
VE.graphic.GroupGraphic
集合
参数
new VE.graphic.GroupGraphic(options)
options
参数名称 | 类型 | 描述信息 |
---|---|---|
id | string | id |
graphics | array | graphic |
clustering | boolean | object |
avoid | boolean | object |
方法
addGraphic (graphic)
批量添加graphic
参数名称 | 类型 | 描述信息 |
---|---|---|
graphic | GraphicOptions |
- 返回值:
graphic |
Array.<graphic>
addGraphics (graphics)
批量添加graphic
参数名称 | 类型 | 描述信息 |
---|---|---|
graphics | Array.<GraphicOptions> |
- 返回值:
Array.<graphic>
addTo (target)
添加到
参数名称 | 类型 | 描述信息 |
---|---|---|
target | VE.Map |
- 返回值:
GroupGraphic
avoidUpdate ()
手动更新避让
destroy ()
销毁
getAllGraphics ()
获取全部graphic
- 返回值:
Array.<graphic>
getGraphic (id)
获取graphic
参数名称 | 类型 | 描述信息 |
---|---|---|
id |
- 返回值:
*
hide ()
隐藏
removeAllGraphic ()
移除所有graphic
removeGraphic (graphic)
移除graphic
参数名称 | 类型 | 描述信息 |
---|---|---|
graphic | object |
- 返回值:
GroupGraphic
setAvoid (options)
开启避让
参数名称 | 类型 | 描述信息 |
---|---|---|
options | boolean | object |
options.enabled | boolean | 是否激活 |
options.extend | number | array |
options.triggerEvents | Array.<VE.EventType> | 触发事件 |
options.label | boolean | 是否对label进行避让 |
options.point | boolean | 是否对point进行避让 |
- 返回值:
Promise.<void>
setClustering (options)
设置聚合
参数名称 | 类型 | 描述信息 |
---|---|---|
options | boolean | object |
options.pixelRange | number | pixelRange范围内的点被判定到同一个聚合 |
options.minimumClusterSize | number | 数量大于minimumClusterSize才会显示这个聚合点 |
options.style | function | 自定义样式 |
聚合示例 |
show ()
显示
updateGraphics (graphics)
更新graphics
参数名称 | 类型 | 描述信息 |
---|---|---|
graphics | Array.<graphic> |