Summary
Methods:
activate |
激活控件 |
deactivate |
禁用控件 |
destroy |
销毁控件 |
getControlType |
获取数据类型 |
getGeometry |
返回最后一次绘制的矩形框 |
getMinArea |
获得框的最小面积 |
getRectStyle |
获得边框的样式 |
setMinArea |
设置框的最小面积 单位像素 |
setRectStyle |
设置边框的样式 |
Constructor
new DragZoom(options)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 可选项
|
Example
let dragZoom = new hmap.control.DragZoom()
map.addControl(dragZoom)
Methods
-
activate()
-
激活控件
-
deactivate()
-
禁用控件
-
destroy()
-
销毁控件
-
getControlType() → {String}
-
获取数据类型
Returns:
String -控件类型
-
getGeometry() → {module:geom~Polygon}
-
返回最后一次绘制的矩形框
Returns:
module:geom~Polygon -
getMinArea() → {Number}
-
获得框的最小面积
Returns:
Number -
getRectStyle() → {module:style~Style}
-
获得边框的样式
Returns:
module:style~Style -
setMinArea(area)
-
设置框的最小面积 单位像素
Parameters:
Name Type Description area
Number 面积
-
setRectStyle(style)
-
设置边框的样式
Parameters:
Name Type Description style
module:style~Style 样式