Class: FMBoxSelectTool

FMBoxSelectTool

FMBoxSelectTool 框选工具类。 属于fengmap.plugins-mapedit.min.js

new fengmap.FMBoxSelectTool(map)

Name Type Description
map Object

FMMap对象

Members

boxStyle

Properties:
Name Type Description
boxStyle Object
Properties
Name Type Description
border string

外框属性,默认为border:2px solid #0000FF

backgroundColor string

选择框背景色,默认为null

opacity string | number

选择框透明度,默认为1

enable

Properties:
Name Type Description
enable boolean

绘制开关,打开true,关闭false,默认为关闭

mouseKey

Properties:
Name Type Description
mouseKey string

鼠标键设置 left:鼠标左键,right:鼠标右键,默认为left

types

Properties:
Name Type Description
types array

返回类型属性,默认为[fengmap.FMType.MODEL,fengmap.FMType.FACILITY,fengmap.FMType.LABEL]

Methods

dispose()

废置框选工具对象

on(type, callback)

框选事件注册

Name Type Description
type string

事件类型

callback function

回调函数

Events

boxselected

绘制完成事件

Example
{
 type:'boxselected', // 事件类型
 targets:[], // 返回所有选中的节点信息数组
 coords:[], // 返回底部选中区域坐标数组
}